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.

Previous Showing 21-30 of 62 results. Next

A106766 Primes with digit sum = 29.

Original entry on oeis.org

2999, 3989, 4799, 4889, 5879, 5897, 5987, 6599, 6689, 6779, 6869, 6959, 6977, 7499, 7589, 7877, 7949, 8597, 8669, 8849, 8867, 9479, 9497, 9587, 9677, 9749, 9767, 9839, 9857, 9929, 12899, 13799, 13997, 14699, 14879, 14897, 14969, 15797, 15887, 15959
Offset: 1

Views

Author

Zak Seidov, May 16 2005

Keywords

Comments

Different from A119892.

Crossrefs

Subsequence of A046704 and of A119892.
Cf. A106754.
Cf. similar sequences listed in A244918.

Programs

  • Magma
    [p: p in PrimesUpTo(16000) | &+Intseq(p) eq 29]; // Vincenzo Librandi, Jul 08 2014
    
  • Mathematica
    Select[Prime[Range[10000]], Total[IntegerDigits[#]]==29 &] (* Vincenzo Librandi, Jul 08 2014 *)
  • PARI
    select(x->sumdigits(x)==29, primes(2000))

A108660 Square-loop primes.

Original entry on oeis.org

2, 13, 31, 79, 97, 227, 881, 1013, 2797, 3181, 3631, 8101, 22727, 81001, 101363, 109013, 131363, 181813, 272227, 310181, 310901, 318181, 318881, 631013, 636313, 810401, 818101, 901097, 904097, 972227, 1018813, 1090013, 1810013, 2272727
Offset: 1

Views

Author

Zak Seidov, Jun 16 2005

Keywords

Comments

Primes such that each pair of adjacent digits (and also the first and the last ones) sums up to a square. First term is arguable since there is 'no pair of adjacent digits', but there are the "first" and "last" digits.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200000]],And@@(IntegerQ[Sqrt[#]]&/@(Total/@Partition[ IntegerDigits[#],2,1,1]))&] (* Harvey P. Dale, Mar 03 2014 *)

A213354 Primes p with digit sums s(p) and s(s(p)) also prime, but s(s(s(p))) not prime.

Original entry on oeis.org

59899999, 69899899, 69899989, 69979999, 69997999, 69999799, 77899999, 78997999, 78998989, 78999889, 78999979, 79699999, 79879999, 79889899, 79979899, 79979989, 79988899, 79989979, 79996999, 79997899, 79997989, 79999789, 79999879, 79999987
Offset: 1

Views

Author

Jonathan Sondow, Jun 10 2012

Keywords

Comments

A046704 is primes p with s(p) also prime. A207294 is primes p with s(p) and s(s(p)) also prime. A070027 is primes p with all s(p), s(s(p)), s(s(s(p))), ... also prime. A104213 is primes p with s(p) not prime. A207293 is primes p with s(p) also prime, but not s(s(p)). A213355 is smallest prime p whose k-fold digit sum s(s(..s(p)..)) is also prime for all k < n, but not for k = n.
Contains primes with digit sums 67, 89, 139, 157, 179,...., A207293(.). So A106807 is a subsequence and examples of numbers in this sequence but not in A106807 are A067180(89), A067180(139) etc. - R. J. Mathar, Feb 04 2021

Examples

			59899999 and s(59899999) = 5+9+8+9+9+9+9+9 = 67 and s(s(59899999)) = s(67) = 6+7 = 13 are all primes, but s(s(s(59899999))) = s(13) = 1+3 = 4 is not prime. No smaller prime has this property, so a(1) = 59899999 = A213355(3).
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[5000000]], PrimeQ[Apply[Plus, IntegerDigits[#]]] && PrimeQ[Apply[Plus, IntegerDigits[Apply[Plus, IntegerDigits[#]]]]] && ! PrimeQ[Apply[Plus, IntegerDigits[Apply[Plus, IntegerDigits[Apply[Plus, IntegerDigits[#]]]]]]] &]

A213355 Smallest prime p whose k-fold digit sum s(s(..s(p)..)) is also prime for all k < n, but whose n-fold digit sum is not prime.

Original entry on oeis.org

13, 67, 59899999
Offset: 1

Views

Author

Jonathan Sondow, Jun 10 2012

Keywords

Comments

The next term has more than 6655555 digits, because s(a(4)) >= a(3) = 59899999 and 59899999/9 > 6655555.
s(a(2)) = a(1) and s(a(3)) = a(2). Can one prove that s(a(n+1)) = a(n), for all n > 0? (Cf. formula below.) If yes, then a(n+1) is the smallest prime p with s(p) = a(n).
A046704 is primes p with s(p) also prime. A207294 is primes p with s(p) and s(s(p)) also prime. A070027 is primes p with all s(p), s(s(p)), s(s(s(p))), ... also prime. A104213 is primes p with s(p) not prime. A207293 is primes p with s(p) also prime, but not s(s(p)). A213354 is primes p with s(p) and s(s(p)) also prime, but not s(s(s(p))).

Examples

			s(13) = 1+3 = 4 is not prime, and s(p) is prime if p < 13, so a(1) = 13.
s(67) = 6+7 = 13 is prime, but s(s(67)) = s(13) = 1+3 = 4 is not prime, and no p < 67 has this property, so a(2) = 67.
s(59899999) = 5+9+8+9+9+9+9+9 = 67 and s(s(59899999)) = s(67) = 6+7 = 13 are prime, but s(s(s(59899999))) = s(13) = 1+3 = 4 is not prime, and no p < 59899999 has this property, so a(3) = 59899999.
		

Crossrefs

a(1) = A104213(1), a(2) = A207293(1), a(3) = A213354(1).

Formula

a(n) <= s(a(n+1)). (Proof: a(n) and s(a(n+1)) share the same property, but a(n) is minimal.)

A091362 Primes p such that the sum of the digits of p is not prime, but the sum of the squares of the digits of p is prime.

Original entry on oeis.org

997, 1699, 2887, 5569, 5659, 5839, 5857, 6199, 6883, 6991, 7477, 8287, 8539, 8863, 8999, 9619, 9907, 11779, 11887, 13399, 13669, 14479, 14767, 14947, 15559, 16369, 16477, 16693, 16747, 16963, 17377, 17449, 17467, 17737, 17791, 17827, 17881
Offset: 1

Views

Author

Chuck Seggelin, Jan 03 2004

Keywords

Comments

Apparently if the squares of the digits of a prime sum to a prime, it is more likely that the digits themselves also sum to a prime. In the first 10,000 primes there are 1558 primes p such that the squares of the digits of p sum to a prime. Of these, only 360 are such that the sums of the digits are not prime. Interestingly, all of these primes have a digit sum of 25 or 35. Essentially this sequence is the terms of A052034 (primes whose digits squared sum to a prime) that do not also appear in A046704 (primes whose digits sum to a prime).

Examples

			a(1)=997 because 9+9+7 = 25 which is not prime, but 9^2+9^2+7^2 = 211 which is prime.
		

Crossrefs

Cf. A046704 (primes whose digits sum to a prime), A052034 (primes whose digits squared sum to a prime).

Programs

  • Mathematica
    ssdQ[n_]:=Module[{idn=IntegerDigits[n]},!PrimeQ[Total[idn]]&&PrimeQ[ Total[ idn^2]]]; Select[Prime[Range[2100]],ssdQ] (* Harvey P. Dale, Jun 28 2011 *)

A108659 Square-chain primes (including square-loop primes).

Original entry on oeis.org

2, 13, 31, 79, 97, 101, 109, 131, 181, 227, 313, 401, 409, 631, 727, 797, 881, 1009, 1013, 1097, 2797, 3109, 3181, 3631, 4001, 4013, 7901, 8101, 9001, 9013, 10009, 10181, 10909, 10979, 13109, 18131, 18181, 22279, 22727, 27901, 31013, 36313
Offset: 1

Views

Author

Zak Seidov, Jun 16 2005

Keywords

Comments

Primes such that each pair of adjacent digits sums up to a square. First term is a square-loop prime, cf. A108660.

Crossrefs

Programs

  • Mathematica
    Join[{2},Select[Prime[Range[5,4000]],PrimeQ[#]&&AllTrue[Sqrt[#]&/@(Total/@Partition[ IntegerDigits[ #],2,1]),IntegerQ]&]] (* Harvey P. Dale, Jun 02 2024 *)

A109981 Primes such that both the sum of digits and the number of digits are primes.

Original entry on oeis.org

11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 113, 131, 137, 139, 151, 157, 173, 179, 191, 193, 197, 199, 223, 227, 229, 241, 263, 269, 281, 283, 311, 313, 317, 331, 337, 353, 359, 373, 379, 397, 401, 409, 421, 443, 449, 461, 463, 467, 487, 557, 571, 577, 593
Offset: 1

Views

Author

Zak Seidov, Jul 06 2005

Keywords

Comments

Cf. A046704 Additive primes: sum of digits is a prime, A088136 Primes such that sum of first and last digits is prime.

Examples

			a(86) = 10037 because both the sum (=11) and number (=5) of digits are primes.
		

Crossrefs

Programs

  • Haskell
    a109981 n = a109981_list !! (n-1)
    a109981_list = filter ((== 1) . a010051' . a055642) a046704_list
    -- Reinhard Zumkeller, Nov 16 2012
  • Mathematica
    Select[Prime[Range[200]], PrimeQ[Length[IntegerDigits[ # ]]]&&PrimeQ[Plus@@IntegerDigits[ # ]]&]

A117460 Primes prime(i) such that their sum-of-index-digits A007953(i) and their sum-of-digits A007605(i) are consecutive primes.

Original entry on oeis.org

2, 3, 5, 43, 113, 191, 373, 821, 1097, 1307, 1493, 1523, 1619, 1873, 1907, 2029, 2081, 2339, 3109, 3169, 3347, 3923, 4339, 4421, 4463, 4603, 5417, 5581, 6067, 6263, 6427, 6607, 6791, 6841, 6863, 7127, 7307, 7673, 7723, 7877, 8731, 9341, 10079, 10723
Offset: 1

Views

Author

Enoch Haga, Mar 18 2006

Keywords

Comments

We select primes such that their sum-of-digits is some prime(j) and such that in addition the sum-of-digits of their index is prime(j-1).
Line 160 of the UBASIC program can be altered for <, >, or = relationships
Subset of A046704 - R. J. Mathar, Apr 17 2009

Examples

			"SOD" = "sum of digits": a(5) = 113, the prime whose index is 30. SOD(30) = 3 and SOD(113) = 5. Since 3 < 5 and 5 is nextprime to 3, adjoin 113 to the sequence.
		

Crossrefs

Programs

  • UBASIC
    10 'use of str,mid,len,val 20 'in SOD prime index and SOD prime 30 Y=1 40 Y=nxtprm(Y) 50 C=C+1:print C;Y;"-"; 60 D=str(C):Z=str(Y) 70 E=len(D):F=len(Z) 80 for Q=2 to E 90 A=mid(D,Q,1):G=val(A) 100 I=I+G:print I; 110 next Q 120 for R=2 to F 130 B=mid(Z,R,1):H=val(B) 140 J=J+H:print J; 150 next R 160 if I=prmdiv(I) and J=prmdiv(J) and I>J and I=nxtprm(J) then stop 170 I=0:J=0 180 goto 40

Formula

{A000040(i): A007605(i) = A000040(j) and A007953(i) = A000040(j+1) for some j}. - R. J. Mathar, Apr 17 2009

Extensions

Edited by R. J. Mathar, Apr 17 2009

A141642 Composite numbers whose sum of digits is a prime.

Original entry on oeis.org

12, 14, 16, 20, 21, 25, 30, 32, 34, 38, 49, 50, 52, 56, 58, 65, 70, 74, 76, 85, 92, 94, 98, 102, 104, 106, 110, 111, 115, 119, 120, 122, 124, 128, 133, 140, 142, 146, 148, 155, 160, 164, 166, 175, 182, 184, 188, 200, 201, 203, 205, 209, 210, 212, 214, 218, 221, 230, 232, 236
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 03 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[300],CompositeQ[#]&&PrimeQ[Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Feb 19 2018 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(sum(map(int, str(n)))) and not isprime(n)
    print([k for k in range(237) if ok(k)]) # Michael S. Branicky, Dec 14 2021

Extensions

More terms from N. J. A. Sloane, Sep 03 2008

A249447 Least n-digit prime whose digit sum is also prime.

Original entry on oeis.org

2, 11, 101, 1013, 10037, 100019, 1000033, 10000019, 100000037, 1000000033, 10000000019, 100000000019, 1000000000039, 10000000000037, 100000000000031, 1000000000000037, 10000000000000079, 100000000000000013, 1000000000000000031, 10000000000000000051, 100000000000000000039
Offset: 1

Views

Author

Paolo P. Lava, Oct 29 2014

Keywords

Comments

Subsequence of A046704 (primes with digits sum being prime).
Some terms of this sequence are also in A003617, the least n-digit primes. - Michel Marcus, Oct 30 2014

Examples

			a(1) = 2 because it is the least prime with just one digit.
a(2) = 11 because it is the least prime with 2 digits whose sum, 1 + 1 = 2, is a prime.
Again, a(7) = 1000033 because it is the least prime with 7 digits whose sum is a prime: 1 + 0 + 0 + 0 + 0 + 3 + 3 = 7.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,b,k,n; for k from 0 to q do
    for n from 10^k to 10^(k+1)-1 do if isprime(n) then a:=n; b:=0;
    while a>0 do b:=b+(a mod 10); a:=trunc(a/10); od;
    if isprime(b) then print(n); break; fi; fi;
    od; od; end: P(10^3);
  • PARI
    a(n) = {p = nextprime(10^(n-1)); while (!isprime(sumdigits(p)), p = nextprime(p+1)); p;} \\ Michel Marcus, Oct 29 2014
Previous Showing 21-30 of 62 results. Next