This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A366835 #47 Dec 25 2024 21:02:30 %S A366835 2,1,1,2,1,0,1,2,1,1,2,2,1,0,1,2,1,1,2,2,2,1,1,2,2,1,1,2,2,2,1,1,2,2, %T A366835 2,2,2,2,2,1,0,1,1,1,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1, %U A366835 1,1,2,2,2,2,2,2,1,1,2,2,2,2,2,2,1,1,2 %N A366835 In the pair (A246655(n), A246655(n+1)), how many primes are there? %C A366835 First 0 terms appear at n = 6, 14, 41, 359, 3589, corresponding to consecutive prime powers (8,9), (25,27), (121,125), (2187,2197) and (32761,32768), respectively (cf. A068315 and A068435). %C A366835 There cannot be primes strictly between consecutive prime powers, so we get the same result considering the whole interval (not just the pair). - _Gus Wiseman_, Dec 25 2024 %H A366835 Michael De Vlieger, <a href="/A366835/b366835.txt">Table of n, a(n) for n = 1..10000</a> %H A366835 Michael De Vlieger, <a href="/A366835/a366835.png">1038 X 1038 raster of a(n)</a>, n = 1..1077444, read left to right in rows, then top to bottom, showing a(n) = 0 in white, a(n) = 1 in red, and a(n) = 2 in dark blue. %e A366835 a(1) = 2 because in the first prime power pair (2 and 3) there are two primes. %e A366835 a(14) = 0 because in the 14th prime power pair (25 and 27) there are no primes. %t A366835 With[{upto=500},Map[Count[#,_?PrimeQ]&,Partition[Select[Range[upto],PrimePowerQ],2,1]]] (* Considers prime powers up to 500 *) %o A366835 (PARI) lista(nn) = my(v=[p| p <- [1..nn], isprimepower(p)]); vector(#v-1, k, isprime(v[k]) + isprime(v[k+1])); \\ _Michel Marcus_, Oct 26 2023 %Y A366835 For perfect powers instead of prime powers we have A080769. %Y A366835 Positions of 1 are A379155, indices of A379157. %Y A366835 Positions of 0 are A379156, indices of A068315. %Y A366835 Positions of 2 are A379158, indices of A379541. %Y A366835 A000015 gives the least prime power >= n. %Y A366835 A000040 lists the primes, differences A001223. %Y A366835 A031218 gives the greatest prime power <= n. %Y A366835 A065514 gives the greatest prime power < prime(n), difference A377289. %Y A366835 A080101 and A366833 count prime powers between primes, see A053607, A304521. %Y A366835 A246655 lists the prime powers, differences A057820. %Y A366835 Cf. A000961, A025474, A046933, A067871, A068435, A175106, A178700, A345531, A362965, A377281. %K A366835 nonn %O A366835 1,1 %A A366835 _Paolo Xausa_, Oct 25 2023