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 11-20 of 28 results. Next

A065073 a(n) = prime(n) + (sum of digits of prime(n)).

Original entry on oeis.org

4, 6, 10, 14, 13, 17, 25, 29, 28, 40, 35, 47, 46, 50, 58, 61, 73, 68, 80, 79, 83, 95, 94, 106, 113, 103, 107, 115, 119, 118, 137, 136, 148, 152, 163, 158, 170, 173, 181, 184, 196, 191, 202, 206, 214, 218, 215, 230, 238, 242, 241, 253, 248, 259, 271, 274, 286
Offset: 1

Views

Author

Bodo Zinser, Nov 09 2001

Keywords

Examples

			a(5) = 13 because p(5) = 11 and 11 + (1 + 1) = 13.
		

Crossrefs

Programs

  • Haskell
    a065073 = a062028 . a000040  -- Reinhard Zumkeller, Sep 27 2014
    
  • Magma
    [NthPrime(n) + &+Intseq(NthPrime(n), 10): n in [1..80]]; // Vincenzo Librandi, Nov 07 2018
  • Mathematica
    Table[ Prime[n] + Apply[ Plus, IntegerDigits[ Prime[n]]], {n, 1, 75} ]
  • PARI
    forprime(p=2,300,print1(p+sumdigits(p),",")) \\ Edited by M. F. Hasler, Nov 06 2018
    
  • PARI
    A065073(n)=sumdigits(n=prime(n))+n \\ M. F. Hasler, Nov 06 2018
    

Formula

a(n) = A062028(A000040(n)). - M. F. Hasler, Nov 06 2018

Extensions

More terms from Larry Reeves (larryr(AT)acm.org) and Robert G. Wilson v, Nov 13 2001

A320866 Primes such that p + digitsum(p, base 4) is again a prime.

Original entry on oeis.org

5, 7, 13, 17, 19, 37, 59, 67, 97, 127, 173, 193, 223, 233, 277, 359, 379, 439, 499, 563, 569, 599, 607, 631, 653, 691, 733, 769, 811, 821, 829, 877, 919, 929, 937, 967, 1009, 1019, 1087, 1093, 1163, 1193, 1213, 1223, 1229, 1297, 1319, 1373, 1399, 1423, 1481, 1483, 1559, 1571, 1597, 1613, 1619, 1627, 1657, 1699, 1733, 1777
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2018

Keywords

Comments

Such primes exist only for even bases b. See A243441, A320867, A320868 and A048519 for the analog in base 2, 6, 8 and 10, respectively. Also, as in base 10, there are no such primes (except 5 and 7) when + is changed to -, see comment in A243442.

Examples

			5 = 4 + 1 = 11[4] (in base 4), and 5 + 1 + 1 = 7 is again prime.
		

Crossrefs

Cf. A047791, A048519 (base 10 analog), A048520, A006378, A107740, A243441 (base 2 analog: p + Hammingweight(p) is prime), A243442 (analog for p - Hammingweight(p)), A320867 (analog for base 6), A320868 (analog for base 8).

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[#+Total[IntegerDigits[#,4]]]&] (* Harvey P. Dale, Feb 06 2020 *)
  • PARI
    forprime(p=1,1999,isprime(p+sumdigits(p,4))&&print1(p","))

A320879 Primes such that iteration of A062028 (n + its digit sum) yields 7 primes in a row.

Original entry on oeis.org

286330897, 10858338851, 12869802851, 15845166851, 29837412851, 45480846799, 56676324799, 56676324863, 68105187851, 73915118861, 114737845853, 129282912851, 154648223809, 155738371853, 207036953861, 271077075851, 358515148853, 373169411809, 373169411861, 395705343799
Offset: 1

Views

Author

Zak Seidov and M. F. Hasler, Nov 08 2018

Keywords

Comments

The first 15 terms are immediately calculated from A320878(1..200) using the formula.

Crossrefs

Cf. A047791, A048519, A062028 (n + digit sum of n).
a(1) = A090009(8) = start of first chain of 8 primes under iteration of A062028.
Subsequence of A320878; A320880 is a subsequence.

Programs

Formula

A320879 = { n in A320878 | A062028(n) in A320878 } = { n = A320878(k) | A062028(n) = A320878(k+1) }.

Extensions

a(16)-a(20) from Lars Blomberg, Feb 10 2019

A320867 Primes such that p + digitsum(p, base 6) is again a prime.

Original entry on oeis.org

11, 19, 23, 31, 41, 53, 61, 79, 109, 137, 151, 167, 179, 229, 233, 263, 271, 331, 347, 359, 419, 439, 467, 541, 557, 587, 599, 607, 653, 719, 797, 809, 839, 863, 997, 1019, 1049, 1097, 1109, 1237, 1283, 1291, 1301, 1321, 1373, 1427, 1439, 1487, 1523, 1549, 1607, 1621, 1697, 1709, 1733, 1741, 1867
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2018

Keywords

Comments

Such primes exist only for an even base b. See A048519, A243441, A320866 and A320868 for the analog in base 10, 2, 4 and 8, respectively. Also, as in base 10, there are no such primes (except 7 and 11) when + is changed to -, see comment in A243442.

Examples

			11 = 6 + 5 = 15[6] (in base 6), and 11 + 1 + 5 = 17 is again prime.
		

Crossrefs

Cf. A047791, A048519 (base 10 analog), A048520, A006378, A107740, A243441 (base 2 analog: p + Hammingweight(p) is prime), A243442 (analog for p - Hammingweight(p)), A320866 (analog for base 4), A320868 (analog for base 8).

Programs

  • Maple
    filter:= n -> isprime(n) and isprime(n+convert(convert(n,base,6),`+`)):
    select(filter, [seq(i,i=3..2000,2)]); # Robert Israel, Mar 22 2020
  • PARI
    forprime(p=1,1999,isprime(p+sumdigits(p,6))&&print1(p","))

A320868 Primes such that p + digitsum(p, base 8) is again a prime.

Original entry on oeis.org

13, 29, 31, 41, 47, 61, 67, 71, 83, 97, 157, 193, 229, 241, 271, 283, 373, 397, 409, 431, 449, 467, 503, 587, 601, 607, 761, 787, 929, 971, 991, 1039, 1087, 1091, 1163, 1181, 1213, 1217, 1237, 1249, 1289, 1291, 1307, 1423, 1453, 1471, 1511, 1543, 1553, 1559, 1627, 1657, 1741, 1811, 1847, 1867, 1973, 1999
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2018

Keywords

Comments

Such primes exist only for an even base b. See A048519, A243441, A320866 and A320867 for the analog in base 10, 2, 4 and 6, respectively. Also, as in base 10, there are no such primes (except 11 and 13) when + is changed to -, see comment in A243442.

Crossrefs

Cf. A047791, A048519 (base 10 analog), A048520, A006378, A107740, A243441 (base 2 analog: p + Hammingweight(p) is prime), A243442 (analog for p - Hammingweight(p)), A320866 (analog for base 4), A320867 (analog for base 6).

Programs

  • Maple
    digsum:= proc(n,b) convert(convert(n,base,b),`+`) end proc:
    select(p -> isprime(p) and isprime(p+digsum(p,8)), [seq(i,i=3..10000,2)]); # Robert Israel, Nov 07 2018
  • PARI
    forprime(p=1,1999,isprime(p+sumdigits(p,8))&&print1(p","))

A048525 Primes for which only three iterations of 'Prime plus its digit sum equals a prime' are possible.

Original entry on oeis.org

277, 1559, 5779, 7489, 11279, 15091, 22093, 37811, 43579, 46279, 48541, 49957, 53479, 54751, 60589, 68473, 72883, 74821, 83621, 85621, 90793, 91921, 93901, 97501, 107981, 110899, 111799, 120193, 153379, 157739, 170299, 180731, 184441
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Examples

			prime 7489 -> 7489 + (7+4+8+9) = prime 7517 -> 7517 + (7+5+1+7) = prime 7537 -> 7537 + (7+5+3+7) = prime 7559 -> next iteration yields composite 7585.
		

Crossrefs

Programs

  • Mathematica
    tiQ[p_]:=Boole[PrimeQ[NestList[#+Total[IntegerDigits[#]]&,p,4]]]=={1,1,1,1,0}; Select[Prime[Range[20000]],tiQ] (* Harvey P. Dale, Dec 02 2024 *)

A048526 Primes for which only four iterations of 'Prime plus its digit sum equals a prime' are possible.

Original entry on oeis.org

37783, 85601, 259631, 268721, 350941, 371939, 378901, 516521, 665111, 733331, 883331, 967781, 1047929, 1056521, 1081721, 1258811, 1427411, 1480573, 1515929, 1584901, 1614929, 1842131, 1875311, 1885981, 2027801, 2044873, 2450531
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Examples

			prime 37783 -> 37783 + (3+7+7+8+3) = prime 37811 -> 37811 + (3+7+8+1+1) = prime 37831 -> 37831 + (3+7+8+3+1) = prime 37853 -> 37853 + (3+7+8+5+3) = prime 37879 -> next iteration yields composite 37913.
		

Crossrefs

Extensions

Changed offset by Lars Blomberg, Dec 05 2013

A244863 Semiprimes whose digit sum is a perfect square.

Original entry on oeis.org

4, 9, 10, 22, 121, 169, 178, 187, 202, 259, 295, 301, 358, 394, 466, 493, 529, 538, 565, 583, 655, 718, 745, 763, 781, 799, 817, 835, 862, 871, 889, 898, 934, 943, 961, 979, 1003, 1111, 1159, 1177, 1186, 1195, 1267, 1285, 1294, 1339, 1357, 1366, 1393, 1438, 1465
Offset: 1

Views

Author

K. D. Bajpai, Jul 07 2014

Keywords

Comments

Subsequence of A028839.

Examples

			178 is in the sequence because 178 = 2*89 (semiprime) and 1+7+8 = 16 (square).
187 is in the sequence because 187 = 11*17 (semiprime) and 1+8+7 = 16 (square).
		

Crossrefs

Cf. A107288 (Primes whose digit sum is square).

Programs

  • Maple
    select(n -> numtheory:-bigomega(n)=2 and issqr(convert(convert(n,base,10),`+`)),
    [$1..3000]); # Robert Israel, Jul 09 2014
  • Mathematica
    Select[Range[3000], PrimeOmega[#] == 2 && IntegerQ[Sqrt[Apply [Plus, IntegerDigits[#]]]] &]

A244733 Semiprimes sp such that sp plus its digit sum is a perfect square.

Original entry on oeis.org

38, 86, 161, 614, 662, 998, 1145, 1355, 1829, 2189, 2483, 4607, 5027, 5315, 6377, 7199, 8258, 11435, 13214, 15611, 17933, 19574, 20153, 21305, 21878, 24014, 26867, 30599, 32738, 34199, 36077, 38387, 38777, 40778, 42422, 46211, 51509, 52874, 56618, 58541, 59987
Offset: 1

Views

Author

K. D. Bajpai, Jul 12 2014

Keywords

Examples

			86 is in the sequence because 86 = 2* 43, which is semiprime. Also, 86 + (8 + 6) = 100 = 10^2.
614 is in the sequence because 614 = 2* 307, which is semiprime. Also, 614 + (6 + 1 + 4) = 625 = 25^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[50000], PrimeOmega[#] == 2 && IntegerQ[Sqrt[# + Apply[Plus, IntegerDigits[#]]]] &]

A245064 Primes p such that p minus its digit sum is a perfect cube.

Original entry on oeis.org

2, 3, 5, 7, 31, 37, 223, 227, 229, 743, 1741, 1747, 3391, 5851, 5857, 9281, 9283, 13841, 19709, 27011, 27017, 35963, 35969, 46681, 46687, 59341, 74101, 91141, 110603, 110609, 132679, 373273, 474581, 474583, 729023, 804383, 1061227, 1259743, 1259749, 1481573, 2000393
Offset: 1

Views

Author

K. D. Bajpai, Jul 11 2014

Keywords

Examples

			37 is in the sequence because it is prime. Also, 37 - (3 + 7 ) = 27 = 3^3: a perfect cube.
743 is in the sequence because it is prime. Also, 743 - (7 + 4 + 3) = 729 = 9^3: a perfect cube.
		

Crossrefs

Programs

  • Maple
    dmax:= 9; # to get all entries < 10^dmax
    cmax:= floor(10^(dmax/3));
    count:= 0;
    for m from 0 to cmax do
       for p from m^3 to m^3 + 9*dmax do
          if p - convert(convert(p,base,10),`+`) = m^3 and isprime(p) then
             count:= count+1;
             A[count]:= p;
          fi
       od
    od;
    {seq(A[i],i=1..count)}; # Robert Israel, Jul 15 2014
  • Mathematica
    Select[Prime[Range[200000]], IntegerQ[CubeRoot[# - Apply[Plus, IntegerDigits[#]]]] &]
  • PARI
    digsum(n) = my(d=eval(Vec(Str(n)))); sum(i=1, #d, d[i])
    s=[]; forprime(p=2, 2002000, if(ispower(p-digsum(p), 3), s=concat(s, p))); s \\ Colin Barker, Jul 15 2014
Previous Showing 11-20 of 28 results. Next