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 18 results. Next

A230857 Leading power of 10 in A006064(n).

Original entry on oeis.org

2, 13, 24, 1111111111124, 2222222222224, 111111111112222222222235, 222222222222222222222246
Offset: 2

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Comments

a(9) = ( 10^1111111111124 + 10^24 + 214 ) / 9.
a(10) = ( 2*10^1111111111124 + 214 ) / 9.

Crossrefs

Cf. A006064.

Extensions

Terms a(9) onward from Max Alekseyev, Oct 31 2013

A230093 Number of values of k such that k + (sum of digits of k) is n.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1
Offset: 0

Views

Author

N. J. A. Sloane, Oct 10 2013

Keywords

Comments

a(n) is the number of times n occurs in A062028.
For n>=1, a(10^n) = a(9*n-1). - Max Alekseyev, Feb 23 2021

Crossrefs

Cf. A006064, A007953 (sum of digits), A062028 (n + sum of its digits), A004207, A228085, A003052, A176995, A225793, A230094, A055642.
Cf. A107740 (this applied to primes).

Programs

  • Haskell
    a230093 n = length $ filter ((== n) . a062028) [n - 9 * a055642 n .. n]  -- Reinhard Zumkeller, Oct 11 2013
    
  • Maple
    # Maple code for A062028, A230093, A003052, A225793, A230094.
    with(LinearAlgebra):
    read transforms; # to get digsum
    M := 1000; A062028 := Array(0..M); A230093 := Array(0..M);
    for n from 0 to M do
       m := n+digsum(n);
       A062028[n] := m;
       if m <= M then A230093[m] := A230093[m]+1; fi;
    od:
    t1:=[seq(A062028[i],i=0..M)]; # A062028 as list (but incorrect offset 1)
    t2:=[seq(A230093[i],i=0..M)]; # A230093 as list, but then a(0) has index 1
    # A003052 := COMPl(t1); # COMPl has issues, may be incorrect for M <> 1000
    ctmax:=4;
    for h from 0 to ctmax do ct[h] := []; od:
    for i from 1 to M do
       h := lis2[i];
       if h <= ctmax then ct[h] := [op(ct[h]),i]; fi;
    od:
    A225793 := ct[1]; A230094 := ct[2]; # A003052 := ct[0]; # see there for better code
  • Mathematica
    Module[{nn=110,a,b,c,d},a=Tally[Table[x+Total[IntegerDigits[x]],{x,0,nn}]];b=a[[All,1]];c={#,0}&/@Complement[Range[nn],b];d=Sort[Join[a,c]];d[[All, 2]]] (* Harvey P. Dale, Jun 12 2019 *)
  • PARI
    apply( A230093(n)=sum(i=n>0,min(9*logint(n+!n,10)+8,n\2),sumdigits(n-i)==i), [1..150]) \\ M. F. Hasler, Nov 08 2018

Extensions

Edited by M. F. Hasler, Nov 08 2018

A230640 Let M(1)=0 and for n>1, B(n)=(M(ceiling(n/2))+M(floor(n/2))+2)/2, M(n)=3^B(n)+M(floor(n/2))+1. This sequence gives M(n).

Original entry on oeis.org

0, 4, 28, 248, 129140168, 68630377364912, 2088595827392656793085408064780643444068898148936888424953199350296
Offset: 1

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Crossrefs

Cf. A230639.
Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)
Smallest number m such that u + (sum of base-b digits of u) = m has exactly n solutions, for bases 2 through 10: A230303, A230640, A230638, A230867, A238840, A238841, A238842, A238843, A006064.

Programs

  • Maple
    f:=proc(n) option remember; local B, M;
    if n<=1 then RETURN([0, 0]);
    else
    B:=(f(ceil(n/2))[2] + f(floor(n/2))[2] + 2)/2;
    M:=3^B+f(floor(n/2))[2]+1; RETURN([B, M]); fi;
    end proc;
    [seq(f(n)[2], n=1..7)];

A230638 Smallest number m such that u + (sum of base-4 digits of u) = m has exactly n solutions.

Original entry on oeis.org

0, 17, 16385, 16777234
Offset: 1

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Comments

Indices of records in A230632: a(n) is the index of the first n in A230632.
The terms are a(1)=0, a(2)=4^2+1, a(3)=4^7+1, a(4)=4^12+17+1, a(5)=4^5368+17+1, a(6)=4^10924+16385+1, a(7)=4^5597880+16385+20. Note that a(7) breaks the pattern of the first six terms.
a(8) = 4^16777229 + 4^12 + 19.
For the leading power of 4 see A230637.

Examples

			n=2: the two solutions to u+(base-4 digit-sum of u) = 17 are 13 and 16.
n=3: the three solutions to u+(base-4 digit-sum of u) = 4^7+1 are 4^7, 4^7-15, 4^7-18.
n=4: the four solutions to u+(base-4 digit-sum of u) = 4^12+17+1 are 4^12+{16, 13, -14, -17}.
		

Crossrefs

Cf. A230637.
Related base-4 sequences: A053737, A230631, A230632, A010064, A230633, A230634, A230635, A230636, A230637, A230638, A010065 (trajectory of 1)
Smallest number m such that u + (sum of base-b digits of u) = m has exactly n solutions, for bases 2 through 10: A230303, A230640, A230638, A230867, A238840, A238841, A238842, A238843, A006064.

Extensions

a(8) from Max Alekseyev, Oct 31 2013

A107740 Number of numbers m such that prime(n) = m + (digit sum of m).

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 1, 1, 0, 1, 1, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 23 2005

Keywords

Comments

a(A049084(A006378(n))) = 0; a(A049084(A048521(n))) > 0. [Corrected by Reinhard Zumkeller, Sep 27 2014]
a(n) <= 2 for n <= 10^5. Conjecture: sequence is bounded.
I would rather conjecture the opposite. Of course a(n) >= m implies n >= A006064(m), having more than A230857(m) digits, i.e., 14, 25 and 1111111111125 digits of n, for a(n) = 3, 4, 5. - M. F. Hasler, Nov 09 2018

Examples

			A000040(26) = 101 = 91 + (9 + 1) = 100 + (1 + 0 + 0): a(26) = # {91, 100} = 2.
		

Crossrefs

Programs

  • Haskell
    a107740 n = length [() | let p = a000040 n,
                             m <- [max 0 (p - 9 * a055642 p) .. p - 1],
                             a062028 m == p]
    -- Reinhard Zumkeller, Sep 27 2014
    
  • Mathematica
    Table[p=Prime[n];c=0;i=1;While[iJayanta Basu, May 03 2013 *)
  • PARI
    apply( A107740(n)=A230093(prime(n)), [1..150]) \\ M. F. Hasler, Nov 08 2018

Formula

a(n) = A230093(prime(n)), i.e.: A107740 = A230093 o A000040. - M. F. Hasler, Nov 08 2018

A230303 Let M(1)=0 and for n >= 2, let B(n)=M(ceiling(n/2))+M(floor(n/2))+2, M(n)=2^B(n)+M(floor(n/2))+1; sequence gives M(n).

Original entry on oeis.org

0, 5, 129, 4102, 87112285931760246646623899502532662132742, 1852673427797059126777135760139006525652319754650249024631321344126610074239106
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2013; Mar 26 2014

Keywords

Comments

M(n) is the smallest value of k such that A228085(k) = n. For example, 129 is the first time a 3 appears in A228085 (and is therefore the first term in A230092). M(4) = 4102 is the first time a 4 appears in A228085 (and is therefore the first term in A227915).

Examples

			The terms are a(1) = 0, a(2) = 2^2+0+1, a(3) = 2^7+0+1, a(4) = 2^12+5+1, a(5) = 2^136+5+1, a(6) = 2^160+129+1, a(7) = 2^4233+129+1, a(8) = 2^8206+4102+1, a(9) = 2^k+4102+1 with k=2^136+4110, ... .
The length (in bits) of the n-th term is A230302(n)+1.
		

Crossrefs

Smallest number m such that u + (sum of base-b digits of u) = m has exactly n solutions, for bases 2 through 10: A230303, A230640, A230638, A230867, A238840, A238841, A238842, A238843, A006064.

Programs

  • Maple
    f:=proc(n) option remember; local B, M;
    if n<=1 then RETURN([0,0]);
    else
    if (n mod 2) = 0 then B:=2*f(n/2)[2]+2;
    else B:=f((n+1)/2)[2]+f((n-1)/2)[2]+2; fi;
    M:=2^B+f(floor(n/2))[2]+1; RETURN([B,M]); fi;
    end proc;
    [seq(f(n)[2],n=1..6)];

Formula

Define i by 2^(i-1) < n <= 2^i. Then it appears that
a(n) = 2^2^2^...^2^x
a tower of height i+3, containing i+2 2's, where x is in the range 0 < x <= 1.
For example, if n=7, i=3, and
a(7) = 2^4233+130 = 2^2^2^2^2^.88303276...
Note also that i+2 = A230864(a(n)).

Extensions

a(1)-a(8) were found by Donovan Johnson, Oct 22 2013.

A230867 Smallest number m such that u + (sum of base-5 digits of u) = m has exactly n solutions.

Original entry on oeis.org

0, 6, 26, 632, 1953134, 30517578152
Offset: 1

Views

Author

N. J. A. Sloane, Nov 05 2013

Keywords

Comments

Indices of records in A230866: a(n) is the index of the first n in A230866.
The next two terms are a(7) = 5^165 + 27, a(8) = 5^317 + 633.

Examples

			a(5) = 1953134 corresponds to the five solutions:
1953099 (base-5: 444444344)
1953103 (base-5: 444444403)
1953105 (base-5: 444444410)
1953129 (base-5: 1000000004)
1953131 (base-5: 1000000011).
		

Crossrefs

A230868 gives the leading power of 5 in a(n).
Smallest number m such that u + (sum of base-b digits of u) = m has exactly n solutions, for bases 2 through 10: A230303, A230640, A230638, A230867, A238840, A238841, A238842, A238843, A006064.

Extensions

a(5) corrected by Donovan Johnson, Nov 05 2013

A238840 Smallest number m such that u + (sum of base-6 digits of u) = m has exactly n solutions.

Original entry on oeis.org

0, 37, 10077697, 2821109907494
Offset: 1

Views

Author

N. J. A. Sloane, Mar 19 2014

Keywords

Comments

The next term is a(5) = 6^((6^9+6^2+8)/5) + 38 = 6^2015548 + 38 and is too large to display.

Crossrefs

Smallest number m such that u + (sum of base-b digits of u) = m has exactly n solutions, for bases 2 through 10: A230303, A230640, A230638, A230867, A238840, A238841, A238842, A238843, A006064.

A238841 Smallest number m such that u + (sum of base-7 digits of u) = m has exactly n solutions.

Original entry on oeis.org

0, 8, 50, 352, 282475258, 232630513987258, 418377847259091645147530834859099334519176045887014771594
Offset: 1

Views

Author

N. J. A. Sloane, Mar 19 2014

Keywords

Crossrefs

Smallest number m such that u + (sum of base-b digits of u) = m has exactly n solutions, for bases 2 through 10: A230303, A230640, A230638, A230867, A238840, A238841, A238842, A238843, A006064.

A238842 Smallest number m such that u + (sum of base-8 digits of u) = m has exactly n solutions.

Original entry on oeis.org

0, 65, 8589934593, 1152921504606847042
Offset: 1

Views

Author

N. J. A. Sloane, Mar 19 2014

Keywords

Comments

The next term is a(5) = 8^((8^11+76)/7) + 66 = 8^1227133524 + 66 and is too large to display.

Crossrefs

Smallest number m such that u + (sum of base-b digits of u) = m has exactly n solutions, for bases 2 through 10: A230303, A230640, A230638, A230867, A238840, A238841, A238842, A238843, A006064.
Showing 1-10 of 18 results. Next