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.

A062132 Digit sums of the primes resulting from A061248.

Original entry on oeis.org

2, 3, 5, 7, 8, 10, 11, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 95, 97, 98, 100, 101, 103, 104
Offset: 1

Views

Author

Patrick De Geest, Jun 05 2001

Keywords

Crossrefs

Cf. A061248.

Programs

  • Mathematica
    t = {s = 2}; Do[If[(y = Total[IntegerDigits[x = Prime[n]]]) > s, AppendTo[t, s = y]], {n, 2, 5*10^6}]; t (* Jayanta Basu, Aug 09 2013 *)

Extensions

More terms from Eric M. Schmidt, Oct 08 2013

A067954 Primes related to the nondecreasing subsequence of A007605 (sums of digits of primes).

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 29, 47, 59, 79, 89, 179, 197, 199, 379, 389, 479, 499, 599, 797, 887, 977, 997, 1699, 1789, 1879, 1889, 1979, 1997, 1999, 2999, 3989, 4799, 4889, 4999, 6899, 8699, 8969, 8999, 18899, 19889, 19979, 19997
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 10 2002

Keywords

Comments

a(1)=2; a(n+1) is the smallest prime with sum of digits >= sum of digits of a(n).

Crossrefs

Programs

  • Mathematica
    t = {s = 2}; Do[If[(y = Total[IntegerDigits[x = Prime[n]]]) >= s, AppendTo[t, x]; s = y], {n, 2, 2500}]; t (* Jayanta Basu, Aug 10 2013 *)

A268605 a(1) = 0; a(n+1) is the smallest integer in which the difference between its digits sum and the a(n) digits sum is equal to the n-th prime.

Original entry on oeis.org

0, 2, 5, 19, 89, 1999, 59999, 4999999, 599999999, 199999999999, 399999999999999, 799999999999999999, 8999999999999999999999, 499999999999999999999999999, 29999999999999999999999999999999, 4999999999999999999999999999999999999
Offset: 1

Views

Author

Francesco Di Matteo, Feb 17 2016

Keywords

Comments

First 8 terms are primes (and are also in A061248). Next terms are not always primes.

Examples

			a(4) = 19 and 1 + 9 = 10; so a(5) = 89 because 8 + 9 = 17 and 17 - 10 = 7, that is the 4th prime.
		

Crossrefs

Programs

  • PARI
    findnext(x, k) = {sx = sumdigits(x); pk = prime(k); y = 1; while (sumdigits(y) - sx != pk, y++); y;}
    lista(nn) = {print1(x = 0, ", "); for (k=1, nn, y = findnext(x, k); print1(y, ", "); x = y;);} \\ Michel Marcus, Feb 19 2016
  • Python
    sumprime = 0
    isPrime=lambda x: all(x % i != 0 for i in range(int(x**0.5)+1)[2:])
    print(0)
    for i in range(2,100):
      if isPrime(i):
        alfa = ""
        k = i + sumprime
        sumprime = k
        while k > 9:
          alfa = alfa + "9"
          k = k - 9
        alfa = str(k)+alfa
        print(alfa)
    

Formula

a(n) = A051885( A007504(n-1) ). - R. J. Mathar, Jun 19 2021

Extensions

NAME adapted to offset by R. J. Mathar, Jun 19 2021

A230045 Palindromic primes with strictly increasing sum of digits.

Original entry on oeis.org

2, 3, 5, 7, 181, 191, 373, 383, 727, 757, 787, 797, 17971, 19891, 19991, 76667, 77977, 78887, 79997, 1987891, 1988891, 1998991, 3799973, 3899983, 3998993, 7897987, 7996997, 9888889, 9889889, 9989899, 199999991, 768989867, 779969977, 779999977, 798989897
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 06 2013

Keywords

Comments

a(1)=2; a(n+1) is the smallest palindromic prime with sum of digits > sum of digits of a(n).

Examples

			a(6) = 191, sum of digits is 11; a(7) = 373, sum of digits is 13 and 13 > 11.
		

Crossrefs

Programs

  • Mathematica
    a = {}; t = 0; Do[z = n*10^(IntegerLength[n] - 1) + FromDigits@Rest@Reverse@IntegerDigits[n]; If[PrimeQ[z], s = Apply[Plus, IntegerDigits[z]]; If[s > t, t = s; AppendTo[a, z]]], {n, 10^5}]; a
Showing 1-4 of 4 results.