jan272026 primes

every now and then i get bothered that we havent figured out primes yet. like, i get that its for the best of all mankind that we dont, but it just bothers me how simple it seems. you just gotta figure out the next time the cycle of factors hits dud. i keep experimenting with this idea of just listing out all the amounts of each prime factor and watching them cycle in and out for each number and its a pretty simple pattern all things considered: factor: 2357etc 2 1 <- 2^1 notice how as each factor 3 01 <- 3^1 for threes we start at 1, visit 1 again, and only *then* 4 20 <- 2^2 shows up it follows a pattern of, go to 1, 5 001 <- 5^1 and obviously theres a gap of length p - 1 between 6 110 <- 2^1 * 3^1 go to 2, then go back to 1 again, 7 0001 <- 7^1 8 3000 <- 2^3 then go to 3, then back to 1 9 0200 <- 3^2 and i havent really calculated it all out but basically 10 1010 <- 2^1 * 5^1 each occurrence of a prime factor p 11 2 follows a pattern 1213121412131215 etc, 12 3 follows 112112113112112113112112114 etc, 13 5 is like 1111211112111121111211113 etc, 14 and theres probably a formula to figure out 15 which number factor its going to be and thats 16 fine but finding primes has a lot more to do with 17 0000001 the zeros and figuring out where the next ...0000001 is 18 and thats super easy when you have all the previous cycles before it, 19 but the only way to know which cycles count is to know which ones are 20 prime, so if you have a big number and you want to know its prime factors, 21 this method doesnt work because the first step is counting out how many 22 "factor digit" thingies you need, and finding out how to calculate where 23 they start their cycles, which is to say, which prime number they are. so essentially this is all about as useful as any other sieve. you have p(n), it'll give you p(n+1). at the very least, its a fun way to visualize the primes. here's my code: r=n=>[...Array(Math.floor(n-1)).keys()].map(k=>k+2);i=n=>n==2||!r(n**0.5).filter(i).some(k=>(n/k)%1==0);c=(n,k)=>(n/k)%1?0:1+c(n/k,k);f=n=>r(n).filter(i).map(k=>c(n,k)) f(2*3*5) // example, should print [1,1,1,] in some format depending on your ide press f12 and paste that into your console for a demo! (r(n) is just a range function 2-n, i(n) is a prime tester, c(n) is a helper function that counts the exponent up, and f(n) will give the breakdown as shown above.) #math #primes #neocities is giving me red underlines when i mismatch parenthesis even though it knows this is a txt file lol #futile