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.

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

Original entry on oeis.org

286330897, 286330943, 388098901, 955201943, 1776186851, 1854778853, 2559495863, 2647782901, 3517793911, 3628857863, 3866728909, 3974453911, 4167637819, 4269837799, 5083007887, 5362197829, 5642510933, 6034811933, 8180784851, 8214319903
Offset: 1

Views

Author

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

Keywords

Comments

In contrast to A048523, ..., A048527, this definition uses "at least" for the number of successive primes. This allows easier computation of subsequences of terms which yield even more primes in a row.
One can nonetheless compute the terms of this sequence by considering possible pre-images under A062028 of terms of A048527. This gives the terms which yield exactly 6 primes in a row (i.e., A320878 \ A320879), and one has to take the union with further iterates of this procedure (which successively yields A320879 \ A320880, etc).

Crossrefs

Cf. A062028 (n + digit sum of n), A047791 (A062028(n) is prime), A048519 (primes among these).
a(1) = A090009(7) = start of first chain of 7 primes under iteration of A062028.
Cf. A230093 (number of m s.th. m + (sum of digits of m) = n) and references there.

Programs

  • PARI
    is_A320878(n,p=n)={for(i=1,6, isprime(p=A062028(p))||return);isprime(n)}
    forprime(p=286e6,,is_A320878(p)&& print1(p","))
    /* much faster, using the precomputed array A048527, as follows: */
    PP(n)=select(p->p+sumdigits(p)==n,primes([n-9*#digits(n),n-2])) \\ Returns list of prime predecessors for A062028. (PP(n) nonempty <=> n in A320881.)
    A320878=[]; my(S=A048527); while(#S=Set(concat(apply(PP,S))), A320878=setunion(A320878,S)) \\ Yields 211 terms from A048527[1..3000]

Formula

Numbers n in A048519 for which A062028(n) is in A048527, form the subset A320878 \ A320879.

A320870 Irregular table: row n >= 0 lists numbers m >= 0 such that n = A062028(m) := m + sum of digits of m.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 11, 7, 12, 8, 13, 9, 14, 15, 20, 16, 21, 17, 22, 18, 23, 19, 24, 25, 30, 26, 31, 27, 32, 28, 33, 29, 34, 35, 40, 36, 41, 37, 42, 38, 43, 39, 44, 45, 50, 46, 51, 47, 52, 48, 53, 49, 54, 55, 60, 56, 61, 57, 62, 58, 63, 59, 64, 65, 70, 66, 71, 67, 72, 68, 73, 69, 74, 75, 80, 76, 81, 77, 82, 78, 83, 79, 84, 85, 90
Offset: 0

Views

Author

M. F. Hasler, Nov 09 2018

Keywords

Comments

Row lengths are given by A230093.

Examples

			The first nonempty rows are:
    n  | list of m
    0  | 0        // since 0 = 0 + 0
    2  | 1        // since 2 = 1 + 1
    4  | 2        // etc.
    6  | 3        // Below 10 every odd row is empty, but thereafter,
    8  | 4        // only rows 20, 31, 42, ..., 108 (steps of 11),
   10  | 5        // 110, 121, 132, ..., 198, etc. are empty.
   11  | 10       // Since 11 = 10 + (1 + 0)
   12  | 6
   13  | 11       // The first prime that yields a prime: 11 + (1 + 1) = 13.
     (...)
  100  | 86       // The first row of length 2 is 101:
  101  | 91, 100  // 101 = 91 + (9 + 1) = 100 + (1 + 0 + 0)
  102  | 87
     (...)
		

Crossrefs

Cf. A007953 (sum of digits of n), A062028 (n + digit sum of n).
Cf. A230093 (number of m such that m + (sum of digits of m) is n).
Cf. A006064 (least m with row length n),
Cf. A003052 (Self or Colombian numbers: rows of length 0), A006378 (Colombian primes).
Cf. A320881 (indices of rows containing a prime), A048520 (primes among these).

Programs

  • Maple
    N:= 100: # for rows 0 to N, flattened
    for i from 0 to N do V[i]:= NULL od:
    for i from 0 to N-1 do
      v:= convert(convert(i,base,10),`+`);
      if v <= N then V[v]:= V[v],i fi
    od:
    seq(V[i],i=1..N); # Robert Israel, Jul 21 2025
  • PARI
    A320870_row(n)=if(n,select(m->m+sumdigits(m)==n,[max(n-9*logint(n,10)+8,n\/2)..n-1]),[0])
Showing 1-2 of 2 results.