cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A364796 Numbers k such that the sum of the first k prime powers (not including 1) is a prime power.

Original entry on oeis.org

1, 2, 3, 6, 8, 13, 18, 20, 22, 37, 41, 43, 46, 62, 87, 89, 95, 99, 111, 115, 118, 124, 130, 146, 150, 160, 164, 168, 180, 192, 201, 205, 211, 221, 263, 283, 287, 315, 339, 352, 356, 364, 396, 398, 408, 418, 434, 442, 450, 476, 508, 512, 526, 534, 536, 548, 556, 582
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 08 2023

Keywords

Examples

			8 is a term because the sum of the first 8 prime powers 2 + 3 + 4 + 5 + 7 + 8 + 9 + 11 = 49 is a prime power.
		

Crossrefs

Programs

  • Mathematica
    Position[Accumulate[Select[Range[4000], PrimePowerQ]], _?PrimePowerQ, Heads -> False] // Flatten
  • PARI
    list(lim) = {my(k = 0, s = 0); for(p = 1, lim, if(isprimepower(p), k++; s += p; if(isprimepower(s), print1(k, ", "))));} \\ Amiram Eldar, Jun 20 2025

A364947 Prime powers that are equal to the sum of the first k prime powers (including 1) for some k.

Original entry on oeis.org

1, 3, 79, 163, 499, 947, 1279, 5297, 6689, 9629, 10853, 17467, 21001, 23887, 25411, 29761, 32089, 33289, 47947, 49429, 55633, 80687, 84697, 96157, 116719, 119159, 126641, 131783, 136991, 153371, 156227, 167861, 182969, 215249, 243161, 257921, 280897, 288853
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 14 2023

Keywords

Examples

			79 is a term because 79 is a prime power and 79 = 1 + 2 + 3 + 4 + 5 + 7 + 8 + 9 + 11 + 13 + 16 = 1 + 2 + 3 + 2^2 + 5 + 7 + 2^3 + 3^2 + 11 + 13 + 2^4.
		

Crossrefs

Intersection of A000961 and A024918.

Programs

  • Mathematica
    Select[Accumulate[Select[Range[2000], # == 1 || PrimePowerQ[#] &]], # == 1 || PrimePowerQ[#] &]
  • PARI
    isp(n) = n == 1 || isprimepower(n);
    list(lim) = {my(s = 0); for(p = 1, lim, if(isp(p), s += p; if(isp(s), print1(s, ", "))));} \\ Amiram Eldar, Jun 20 2025
Showing 1-2 of 2 results.