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.

User: Peter Weiss

Peter Weiss's wiki page.

Peter Weiss has authored 14 sequences. Here are the ten most recent ones:

A292568 a(n) = a(n-1) + sum of base-1000 digits of a(n-1), a(0)=1.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 1049, 1099, 1199, 1399, 1799, 2599, 3200, 3403, 3809, 4621, 5246, 5497, 5999, 7003, 7013, 7033, 7073, 7153, 7313, 7633, 8273, 8554, 9116, 9241, 9491, 9991, 10991, 11992, 12995, 14002, 14018, 14050, 14114, 14242, 14498
Offset: 0

Author

Peter Weiss, Sep 19 2017

Keywords

Comments

In Germany you just write Q3 for the base-1000 digit sum (see book: "Taschenbuch der Mathematik" by Bronstein, Semendjajew, Musiol, Mühlig, p. 332) and you need it for the so-called "Teilbarkeitskriterium" for the number 37. If you add Q3 to a number you can also find this rule for the number 37.
Sum of base-1000 digits of m can also be described as "break the digit-string of m into triples starting at the right, and add these 3-digit numbers". For example, 1234567 -> 567 + 234 + (00)1 = 802.
None of the numbers of this sequence is divisible by 3 or 37.
The general form of this sequence is n + sum of base-(10^m) digits of n.
m=1: 1, 2, 4, 8, 16, 23, 28, 38, 49, 62, 70, 77, 91, 101, 103, ... (Cf. A004207.)
m=2: 1, 2, 4, 8, 16, 32, 64, 128, 157, 215, 232, 266, 334, 371, ... (Cf. A286660.)
m=3: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 1049, 1099, ... (this sequence)

Examples

			a(16) = 2599 = 2 * 1000^1 + 599 * 1000^0. The sum of digits of a(17 - 1) = 2599 in base 1000 is therefore 2 + 599 = 601. a(17) = a(16) + the sum of digits of a(60) in base 1000 is therefore 2599 + 601 = 3200.
		

Crossrefs

Programs

  • Mathematica
    NestList[Total[IntegerDigits[#,1000]]+#&,1,50] (* Harvey P. Dale, Dec 12 2018 *)
  • PARI
    a(n) = if (n==0, 1, prev = a(n-1); prev + sumdigits(prev, 1000)); \\ Michel Marcus, Sep 20 2017

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

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

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

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

A292218 The n-th iteration of (k -> k + sum of base-100 digits of k) applied to n.

Original entry on oeis.org

2, 8, 24, 64, 160, 285, 203, 266, 450, 538, 550, 642, 566, 488, 678, 958, 1120, 945, 686, 1241, 1032, 1144, 1339, 1671, 1229, 1499, 1377, 1492, 1945, 1515, 1745, 2108, 1650, 2326, 2110, 2106, 2558, 2105, 2049, 2548, 2590, 2247, 2786, 2750
Offset: 1

Author

Peter Weiss, Sep 11 2017

Keywords

Comments

Main diagonal of square array A(n, k), where A(n, k) gives the result of k applications of the map x -> x + sum of base-100 digits of x, starting at n. - Felix Fröhlich, Sep 12 2017

Examples

			n=6:  6+6=12, 12+12=24, 24+24=48, 48+48=96, 96+96=192, 192+92+(0)1=285. After 6 iterations you get 285, so a(6)=285.
		

Crossrefs

Programs

  • Mathematica
    Table[Nest[# + Total@ IntegerDigits[#, 100] &, n, n], {n, 44}] (* Michael De Vlieger, Sep 11 2017 *)
  • PARI
    a(n) = my(x=n); for (k=1, n, x += vecsum(digits(x, 100))); x; \\ Michel Marcus, Sep 12 2017

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

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

A290574 Self numbers that are the product of two self numbers greater than one.

Original entry on oeis.org

9, 378, 400, 525, 602, 1155, 1188, 1862, 2055, 2200, 2325, 2415, 2492, 2560, 2907, 3045, 3348, 3392, 3460, 3515, 3717, 3752, 3965, 4180, 4360, 4382, 4415, 4865, 4920, 5115, 5418, 5517, 5719, 6138, 6228, 6900, 7038, 7060, 7396, 7532, 7565, 7609, 7947, 8162, 8342, 8465, 8520, 8700, 8757, 8869, 8970, 9152, 9365, 9387, 9409, 9420, 9422, 9499, 9870, 9925
Offset: 1

Author

Peter Weiss, Aug 06 2017

Keywords

Examples

			The product of the self numbers 31 and 75 is the self number 2325, so 2325 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 10^4, s}, s = Rest@ Complement[Range@ nn, Union[Table[n + Total@ IntegerDigits@ n, {n, nn}]]]; Select[Range@ nn, Function[n, And[MemberQ[s, n], AnyTrue[Map[{#, n/#} &, Rest@ TakeWhile[Divisors@ n, # <= Sqrt@ n &]], AllTrue[#, MemberQ[s, #] &] &]]]]] (* or *)
    Block[{nn = 5000, s}, s = Rest@ Complement[Range@ nn, Union@ Table[n + Total@ IntegerDigits@ n, {n, nn}]]; Select[Union@ Sort@ Map[Times @@ # &@ # &, Tuples[s, {2}]], MemberQ[s, #] &]] (* Michael De Vlieger, Aug 23 2017, after T. D. Noe at A003052 *)
  • PARI
    is(n)=if(!is_A003052(n), return(0)); fordiv(n,d, if(d==1, next); if(d^2>n, break); if(is_A003052(d) && is_A003052(n/d), return(1))); 0 \\ Charles R Greathouse IV, Aug 23 2017
    
  • PARI
    is_A290574(n)={is_A003052(n) && fordiv(n,d, d^2>n && break; d>1 && is_A003052(d) && is_A003052(n/d) && return(1))} \\ M. F. Hasler, Nov 09 2018

Extensions

Corrected by Charles R Greathouse IV, Aug 23 2017

A290426 Products of two self numbers (A003052).

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 20, 21, 25, 27, 31, 35, 42, 45, 49, 53, 60, 63, 64, 75, 81, 86, 93, 97, 100, 108, 110, 121, 126, 132, 140, 143, 154, 155, 159, 165, 176, 180, 187, 192, 198, 209, 210, 211, 217, 222, 225, 233, 244, 255, 258, 265, 266, 277, 279, 288, 291, 294, 299, 310, 312, 320, 323, 324, 330, 334, 345, 356, 363, 367, 371
Offset: 1

Author

Peter Weiss, Jul 31 2017

Keywords

Examples

			The product of the self numbers 3 and 86 is 258, so 258 is in the sequence.
		

Crossrefs

Cf. A003052.

A288469 a(n) = n if n is a nonprime, otherwise take the prime index of n and repeat until you get a nonprime which is then a(n).

Original entry on oeis.org

1, 1, 1, 4, 1, 6, 4, 8, 9, 10, 1, 12, 6, 14, 15, 16, 4, 18, 8, 20, 21, 22, 9, 24, 25, 26, 27, 28, 10, 30, 1, 32, 33, 34, 35, 36, 12, 38, 39, 40, 6, 42, 14, 44, 45, 46, 15, 48, 49, 50, 51, 52, 16, 54, 55, 56, 57, 58, 4, 60, 18, 62, 63, 64, 65, 66, 8, 68, 69, 70, 20, 72, 21, 74, 75, 76, 77, 78, 22, 80, 81, 82, 9, 84, 85, 86
Offset: 1

Author

Peter Weiss, Jun 09 2017

Keywords

Comments

a(n) = 1 for n in A007097. - Robert Israel, Jun 09 2017

Examples

			For n = 17:  17 is a prime, so you take the prime index of 17 which is 7. 7 is a prime, so you take the prime index of 7 which is 4. 4 is a nonprime, so a(17) = 4.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; if isprime(n) then procname(numtheory:-pi(n)) else n fi end proc:
    map(f, [$1..100]); # Robert Israel, Jun 09 2017
  • Mathematica
    Table[If[!PrimeQ@ n, n, NestWhile[PrimePi, n, PrimeQ]], {n, 86}] (* Michael De Vlieger, Jun 09 2017 *)
  • PARI
    a(n)=while(isprime(n), n=primepi(n)); n \\ Charles R Greathouse IV, Jun 09 2017

Formula

From Robert Israel, Jun 09 2017: (Start)
a(n) = n + A010051(n)*(a(A000720(n))-n).
a(A114537(n,k)) = A114537(n,1). (End)

A286660 a(n) = a(n-1) + sum of base-100 digits of a(n-1), a(0) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 157, 215, 232, 266, 334, 371, 445, 494, 592, 689, 784, 875, 958, 1025, 1060, 1130, 1171, 1253, 1318, 1349, 1411, 1436, 1486, 1586, 1687, 1790, 1897, 2012, 2044, 2108, 2137, 2195, 2311, 2345, 2413, 2450, 2524, 2573, 2671, 2768, 2863, 2954, 3037, 3104, 3139
Offset: 0

Author

Peter Weiss, May 12 2017

Keywords

Examples

			a(7) = 128 = 1 * 100^1 + 28 * 100^0. The sum of digits of a(8 - 1) = 128 in base 100 is therefore 1 + 28 = 29. a(8) = a(7) + the sum of digits of a(7) in base 100 is therefore 128 + 29 = 157.
		

Crossrefs

Programs

  • Maple
    g:= n -> n+convert(convert(n,base,100),`+`):
    A[0]:= 1:
    for n from 1 to 100 do A[n]:= g(A[n-1]) od:
    seq(A[i],i=0..100); # Robert Israel, May 22 2017
  • Mathematica
    a[0] = 1; a[n_] := a[n] = a[n-1] + Total[IntegerDigits[a[n-1], 100]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 21 2017 *)
    NestList[#+Total[IntegerDigits[#,100]]&,1,60] (* Harvey P. Dale, May 26 2019 *)
  • PARI
    a(n) = if(n < 8, return(1<<(n-1))); my(r = cr = 128); for(i=8, n, while(cr > 0, r += cr % 100; cr \= 100); cr = r); r \\ David A. Corneth, May 15 2017

A281592 Products of three distinct primes p1, p2 and p3 (sphenic numbers) with p1

Original entry on oeis.org

138, 777, 4642, 10258, 10263, 12207, 13282, 16167, 19762, 30783, 37407, 38482, 46978, 48927, 56127, 60145, 63543, 73767, 81687, 89823, 95367, 95627, 103863, 110905, 115527, 128545, 202705, 208879, 223643, 284119, 324947, 325793, 360151, 395003, 477538, 541163, 558322, 585538, 672199, 673693, 780082, 914551, 1016643
Offset: 1

Author

Peter Weiss, Apr 14 2017

Keywords

Examples

			10258 is in the sequence because 10258 = 2*23*223 and 223 is the concatenation of 2 with 23.
		

Crossrefs

Cf. A007304, A133980 (the p3 primes).

Programs

  • Mathematica
    c[x_, y_] := x 10^IntegerLength[y] + y; upto[mx_] := Sort@ Reap[Block[{p=2, q=3, v=1}, While[v <= mx, While[p < q && (v = p q (r = c[p, q])) <= mx, If[PrimeQ@r, Sow@v]; p = NextPrime[p]]; p=2; q = NextPrime[q]; v = p q c[p, q]]]][[2, 1]]; upto[10^6] (* Giovanni Resta, Apr 14 2017 *)
  • PARI
    isok(n) = f = factor(n); ((#f~ == 3) && (vecmax(f[,2]) == 1) && (f[3,1] == fromdigits(concat(digits(f[1,1]), digits(f[2,1]))))); \\ Michel Marcus, Apr 14 2017