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-10 of 80 results. Next

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.

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

Original entry on oeis.org

56676324799, 373169411809, 2121959132809, 10180781225809, 14328311692789, 17429111275789, 32594135422789, 34327062247789, 39262151325799, 57404320087789, 60760513291789, 63116080460809, 66105224572789, 92054642332789, 98606700040789
Offset: 1

Views

Author

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

Keywords

Comments

Term a(1) is immediate to find from the nearly equal terms A320879(7..8); terms a(2..9) were found by G. Resta as answer to Rivera's Puzzle 163, cf. link.

Crossrefs

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

Programs

Formula

A320880 = { n in A320879 | A062028(n) in A320879 }.

Extensions

a(10)-a(15) from Lars Blomberg, Feb 10 2019

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

A181664 Let f(m) = number of steps needed to reach a Harshad number when the map k->A062028(l) is iterated starting at m; a(n) = smallest m such that f(m) = n.

Original entry on oeis.org

15, 19, 14, 28, 23, 16, 22, 65, 55, 142, 134, 130, 119, 109, 95, 79, 71, 58, 47, 37, 32, 25, 17, 13, 11, 44, 256, 245, 235, 815, 1313, 1489, 1469, 1510, 1493, 1480, 1829, 1828, 1814, 1789, 1772, 3115, 4295, 4276, 4262, 4246, 4229, 4216, 4196, 4177, 4163, 4147, 4183, 4166, 4153, 4142, 4132, 4118, 4111, 4094, 4081, 8914, 8885, 8857, 8834, 8809, 8783, 8761, 8741, 8722, 8699, 8674, 8648, 8626, 8597, 8569, 8546, 8530, 8513, 8491, 8471, 8452, 8429, 8413, 8387, 8365, 8345, 8326, 8312, 8287, 8270, 8248, 8228, 8209, 8186, 8170, 8153, 8140, 31085, 31072
Offset: 1

Views

Author

N. J. A. Sloane, Nov 18 2010

Keywords

Comments

Terms were computed by D. S. McNeil, Claudio Meller and Hans Havermann.

References

  • Eric Angelini, Posting to Sequence Fans Mailing List, Sep 20 2010

Crossrefs

A292202 The n-th iteration of A062028 starting with n.

Original entry on oeis.org

2, 8, 15, 28, 25, 33, 59, 77, 90, 79, 109, 111, 134, 137, 129, 148, 184, 189, 218, 197, 204, 226, 250, 231, 284, 284, 297, 313, 325, 309, 341, 398, 354, 418, 418, 414, 488, 440, 438, 478, 529, 465, 545, 554, 531, 628, 658, 561, 620, 677, 624, 697, 697, 657, 785, 818, 735, 865, 835, 762, 851, 851
Offset: 1

Views

Author

Peter Weiss, Sep 11 2017

Keywords

Comments

a(n) == n*2^n (mod 9). This has a period of 18. - Robert Israel, Sep 11 2017

Examples

			n=5: 5+5=10, 10+1+0=11, 11+1+1=13, 13+1+3=17, 17+1+7=25. After 5 iterations you get 25, so a(5)=25.
		

Crossrefs

Programs

  • Maple
    A062028:= proc(t) option remember; t + convert(convert(t,base,10),`+`):end proc:
    seq((A062028@@n)(n), n=1..100); # Robert Israel, Sep 11 2017
  • Mathematica
    Table[Nest[# + Total@ IntegerDigits@ # &, n, n], {n, 62}] (* Michael De Vlieger, Sep 11 2017 *)
  • PARI
    a(n) = my(x=n); for (k=1, n, x += sumdigits(x)); x; \\ Michel Marcus, Sep 12 2017

A181614 a(n) = number of steps needed to reach a Harshad number when the map k->A062028(l) is iterated starting at n, or -1 if a Harshad number is never reached.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 24, 3, 1, 6, 23, 0, 2, 0, 0, 7, 5, 0, 22, 6, 0, 4, 1, 0, 3, 21, 5, 5, 2, 0, 20, 3, 4, 0, 4, 0, 1, 26, 0, 3, 19, 0, 2, 0, 3, 25, 26, 0, 9, 2, 2, 18, 24, 0, 25, 1, 0, 23, 8, 4, 1, 24, 1, 0, 17, 0, 23, 22, 2, 7, 24, 3, 16, 0, 0, 23, 22, 0
Offset: 1

Views

Author

N. J. A. Sloane, Nov 18 2010

Keywords

References

  • Eric Angelini, Posting to Sequence Fans Mailing List, Sep 20 2010

Crossrefs

Extensions

a(22) onward from John W. Layman, Nov 19 2010

A292512 Sequence A: Start with n, add the sum of digits of n (A062028) and repeat. Sequence B: Start with n, add the sum of base-100 digits of n and repeat. a(n) is the smallest common number > n.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 221, 341, 24, 109, 218, 30, 1171, 173, 36, 406, 80, 84, 88, 851, 96, 163, 104, 54, 218, 346, 120, 628, 1171, 231, 173, 181, 72, 197, 406, 213, 538, 260, 237, 1003, 1705, 90, 184, 719, 1041, 1015, 365, 111, 320, 127, 117, 418, 488, 114, 1487, 137, 120, 122, 199, 126, 1171, 298, 231, 134, 677
Offset: 1

Views

Author

Peter Weiss, Sep 18 2017

Keywords

Comments

If you start with n=1 and take a third sequence C (n + sum of base-1000 digits of n), the first common numbers of the three sequences are 2, 4, 8, 16 and 1027975.
The common numbers for the first ten primes are:
2 -> 4, 8, 16, 1027975, ...
3 -> 24, 96, 60342, ...
5 -> 10, 469534, ...
7 -> 14, 131558, ...
11 -> 923428, ...
13 -> 668495, ...
17 -> 81820, ...
19 -> 2061797, ...
23 -> 2227118, ...
29 -> 12278, ...

Examples

			n=10: Sequence A: 10, 11, 13, 17, 25, 32, 37, 47, 58, 71, 79, 95, 109, 119, 130, 134, 142, 149, 163, 173, 184, 197, 214, 221, ...
Sequence B: 10, 20, 40, 80, 160, 221, ...
-> 221 is the first common number > 10, so a(n)=221.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 10^3}, Table[With[{A = Rest@ NestList[# + Total@ IntegerDigits@ # &, n, m]}, NestWhile[# + Total@ IntegerDigits[#, 100] &, n, FreeQ[A, #] &, 1, m]], {n, 68}]] (* Michael De Vlieger, Sep 23 2017 *)
  • PARI
    a(n) = my (A=n + sumdigits(n), B=n + sumdigits(n,100)); while (1, if (A==B, return (A), ARémy Sigrist, Sep 23 2017

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])

A320882 Primes p such that repeated application of A062028 (add sum of digits) yields two other primes in a row: p, A062028(p) and A062028(A062028(p)) are all prime.

Original entry on oeis.org

11, 59, 101, 149, 167, 257, 277, 293, 367, 419, 479, 547, 617, 727, 839, 1409, 1559, 1579, 1847, 2039, 2129, 2617, 2657, 2837, 3449, 3517, 3539, 3607, 3719, 4217, 4637, 4877, 5689, 5779, 5807, 5861, 6037, 6257, 6761, 7027, 7489, 7517, 8039, 8741, 8969, 9371, 9377, 10667, 10847, 10937, 11257, 11279, 11299, 11657
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2018

Keywords

Comments

"Iterates" the idea of A048519 (p and A062028(p) are prime), also considered in A048523, A048524, A048525, A048526, A048527. (This is the union of A048524, A048525, A048526, A048527 etc. A048525(1) = 277 = a(7).)

Crossrefs

Subsequence of A048519: p and A062028(p) are prime.
Cf. A047791, A048520, A006378, A107740, A243441 (p and p + Hammingweight(p) are prime), A243442 (analog for p - Hammingweight(p)).
Cf. A048523, ..., A048527, A320878, A320879, A320880: primes starting a chain of length 2, ..., 9 under iterations of A062028(n) = n + digit sum of n.

Programs

  • Maple
    f:= n -> n + convert(convert(n,base,10),`+`):
    filter:= proc(n) local x;
    if not isprime(n) then return false fi;
    x:= f(n);
    isprime(x) and isprime(f(x))
    end proc:
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Dec 17 2020
  • PARI
    is_A320882(n,p=n)=isprime(p=A062028(p))&&isprime(A062028(p))&&isprime(n) \\ Putting isprime(n) to the end is more efficient for the frequent case when the terms are already known to be prime.
    forprime(p=1,14999,isprime(q=A062028(p))&&isprime(A062028(q))&&print1(p","))

A292566 Primes that can be reached with their prime-index, if you start with the prime-index and use iterations of A062028.

Original entry on oeis.org

2, 11, 107, 191, 587, 719, 1061, 1171, 1181, 1259, 1327, 1487, 1597, 1619, 1933, 1949, 2011, 2141, 2269, 2477, 2803, 2999, 3041, 3049, 3079, 3169, 3229, 3259, 3617, 3733, 4493, 4799, 5009, 5023, 5171, 5261, 5581, 5657, 6131, 6211, 6301, 6311, 6421, 6451, 6529
Offset: 1

Views

Author

Peter Weiss, Sep 19 2017

Keywords

Comments

If p is in the sequence, its index A000720(p) is not divisible by 3. - Robert Israel, Sep 19 2017

Examples

			The prime-index of 11 is 5: 5+5=10, 10+1+0=11 -> after two iterations you reach 11, so 11 is in the sequence.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t, p;
      p:= ithprime(n);
      t:= n;
      do
        t:= t + convert(convert(t,base,10),`+`);
        if t > p then return NULL
        elif t = p then return p
        fi
      od;
    end proc:
    map(f, [$1..1000]); # Robert Israel, Sep 19 2017
  • Mathematica
    ok[p_] := Block[{n = PrimePi@ p}, While [n < p, n += Total@ IntegerDigits@ n]; n == p]; Select[Prime@ Range@ 600, ok] (* Giovanni Resta, Sep 19 2017 *)
  • PARI
    is(n) = my(x=primepi(n)); while(1, x=x+sumdigits(x); if(x==n, return(1), if(x > n, return(0))))
    forprime(p=1, 7000, if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Sep 19 2017

Extensions

More terms from Felix Fröhlich, Sep 19 2017
Showing 1-10 of 80 results. Next