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-4 of 4 results.

A235399 Numbers which are the digital sum of the cube of some prime.

Original entry on oeis.org

8, 9, 10, 17, 19, 26, 28, 35, 37, 44, 46, 53, 55, 62, 64, 71, 73, 80, 82, 89, 91, 98, 100, 107, 109, 116, 118, 125, 127, 134, 136, 143, 145, 152, 154, 161, 163, 170, 172, 179, 181, 188, 190, 197, 199, 206, 208, 215, 217, 224, 226, 233, 235, 242, 244, 251, 253
Offset: 1

Views

Author

Keywords

Comments

A235398 sorted and duplicates removed.

Crossrefs

Programs

  • Mathematica
    Total[IntegerDigits[#]] & /@ (Prime[Range[5000000]]^3) // Union (* The program generates the first 39 terms of the sequence. To generate more, increase the Range constant. *) (* Harvey P. Dale, Sep 19 2021 *)
  • PARI
    list(maxx)={v=List();n=2; while(n<=maxx,q=n^3;summ=sumdigits(q);
    if(setsearch(v,summ)<1,listput(v,summ));n=nextprime(n+1));vecsort(v,,8) ;} \\ Bill McEachen, Jan 29 2014

Formula

Conjecture: for n > 4, a(n) = a(n-2) + 9 = A056020(n).
Conjecture: a(n) = (1/4)*(-1)^n*(9*(-1)^n*(2*n-1) + 5), n >= 3. - Bill McEachen, Feb 13 2021

Extensions

a(37)-a(57) from Lars Blomberg, Feb 10 2016

A290944 Primes p such that sum of digits of p^3 is a perfect square.

Original entry on oeis.org

3, 1753, 1999, 2389, 2713, 3301, 3361, 3529, 3583, 3607, 3631, 3643, 3697, 3889, 3907, 4093, 4099, 4129, 4153, 4159, 4243, 4423, 4591, 4639, 4813, 5167, 5449, 5503, 5527, 5563, 5683, 5689, 5827, 6199, 6211, 6427, 6529, 6553, 6691, 6709, 6883, 6949, 6961, 6997
Offset: 1

Views

Author

K. D. Bajpai, Aug 14 2017

Keywords

Comments

All the terms in this sequence, except a(1), are congruent to 1 mod 3.
After a(1), all the terms are congruent to {1, 4, 7} mod 9.

Examples

			a(1) = 3 is prime: 3^3 = 27; 2 + 7 = 9 = 3^2.
a(2) = 1753 is prime: 1753^3 = 5386984777; 5 + 3 + 8 + 6 + 9 + 8 + 4 + 7 + 7 + 7 = 64 = 8^2.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsSquare(&+Intseq(p^3))];
    
  • Maple
    f:= n->add(d, d=convert(n^3, base, 10)):
    select(t -> type(sqrt(f(t)), integer), [seq(ithprime(m), m=1..10^3)]);
  • Mathematica
    Select[Prime[Range[2000]], IntegerQ[Sqrt[Plus @@ IntegerDigits[#^3]]] &]
  • PARI
    forprime(p=1, 5000, if(issquare(sumdigits(p^3)), print1(p, ", ")));
    
  • PARI
    is(n) = ispseudoprime(n) && issquare(sumdigits(n^3)) \\ Felix Fröhlich, Aug 14 2017

A290963 Primes p such that sum of digits of p^3 is semiprime.

Original entry on oeis.org

3, 7, 29, 41, 53, 59, 71, 83, 89, 113, 131, 137, 149, 157, 167, 173, 179, 197, 199, 227, 233, 239, 251, 263, 269, 281, 293, 317, 347, 379, 401, 409, 419, 431, 457, 463, 467, 479, 491, 503, 509, 521, 569, 617, 619, 641, 643, 647, 661, 677, 691, 701, 733, 743, 757, 761, 769, 797, 823, 829, 859, 883, 911
Offset: 1

Views

Author

K. D. Bajpai, Aug 15 2017

Keywords

Examples

			a(2) = 7 is prime: 7^3 = 343; 3 + 4 + 3 = 10 = 2*5 that is semiprime.
a(3) = 29 is prime : 29^3 = 24389; 2 + 4 + 3 + 8 + 9 = 26 = 2*13 that is semiprime.
a(5) = 53 is prime : 53^3 = 148877; 1 + 4 + 8 + 8 + 7 + 7 = 35 = 5*7 that is semiprime.
		

Crossrefs

Programs

  • Maple
    select(p -> isprime(p) and numtheory:-bigomega(convert(convert(p^3,base,10),`+`)) = 2, [seq(i,i=3..1000,2)]); # Robert Israel, Aug 15 2017
  • Mathematica
    Select[Prime[Range[500]], PrimeOmega[Plus @@ IntegerDigits[#^3]] == 2 &]
  • PARI
    lista(nn) = forprime(p=3, nn, if(bigomega(sumdigits(p^3)) == 2, print1(p, ", "))); \\ Altug Alkan, Aug 16 2017

A291052 Primes p such that the sum of the cubes of digits of p equals the sum of digits of p^3.

Original entry on oeis.org

2, 31, 103, 1321, 2003, 3001, 3221, 10303, 21323, 23021, 30203, 30313, 31123, 31223, 31321, 32003, 33013, 33211, 100003, 102241, 103231, 113023, 122033, 122321, 130223, 131203, 132001, 132103, 133201, 133213, 200003, 203311, 210233, 213203, 220411, 221303, 223211
Offset: 1

Views

Author

K. D. Bajpai, Aug 17 2017

Keywords

Examples

			a(2)=31 is prime: [3^3 + 1^3 = 27 + 1] = 28; [31^3 = 29791, 2+9+7+9+1] = 28.
a(4)=1321 is prime: [1^3 + 3^3 + 2^3 + 1^3 = 1 + 27 + 8 + 1] = 37; [31^3 = 2305199161, 2+3+0+5+1+9+9+1+6+1] = 37.
		

Crossrefs

Intersection of A000040 and A165551.

Programs

  • Mathematica
    Select[Prime[Range[30000]], Total[IntegerDigits[#]^3] == Plus @@ IntegerDigits[#^3] &]
  • PARI
    forprime(p=1, 30000, d=digits(p); if(sum(i=1, length(d), d[i]^3) == sumdigits(p^3), print1(p", ")));
Showing 1-4 of 4 results.