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

A230637 Leading power of 4 in A230638.

Original entry on oeis.org

2, 7, 12, 5468, 10924, 5597880, 16777229
Offset: 2

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Comments

a(9) = ( 4^5468 + 2*4^12 + 39 ) / 3.
a(10) = 4^5468 + 13.
a(11) = ( 4^10924 + 2*4^5468 + 16407 ) / 3.
a(12) = 4^10924 + 10925
a(13) = ( 4^5597880 + 3*4^10924 + 32793 ) / 3.
a(14) = ( 2*4^5597880 + 32812 ) / 3.
a(15) = ( 4^16777229 + 4^5597880 + 2*4^12 + 16427 ) / 3.
a(16) = ( 2*4^16777229 + 4^13 + 42 ) / 3.

Crossrefs

Cf. A230638.
Related base-4 sequences: A053737, A230631, A230632, A010064, A230633, A230634, A230635, A230636, A230637, A230638, A010065 (trajectory of 1)

Extensions

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

A053737 Sum of digits of (n written in base 4).

Original entry on oeis.org

0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 9, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 3, 4, 5, 6, 4, 5, 6, 7, 5
Offset: 0

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

Also the fixed point of the morphism 0->{0,1,2,3}, 1->{1,2,3,4}, 2->{2,3,4,5}, etc. - Robert G. Wilson v, Jul 27 2006

Examples

			a(20) = 1+1+0 = 2 because 20 is written as 110 base 4.
From _Omar E. Pol_, Feb 21 2010: (Start)
This can be written as a triangle (cf. A000120):
  0,
  1,2,3,
  1,2,3,4,2,3,4,5,3,4,5,6,
  1,2,3,4,2,3,4,5,3,4,5,6,4,5,6,7,2,3,4,5,3,4,5,6,4,5,6,7,5,6,7,8,3,4,5,6,4,5,6,7,5,6,7,8,6,7,8,9,
  1,2,3,4,2,3,4,5,3,4,5,6,4,5,6,7,2,3,4,5,3,4,5,6,4,5,6,7,5,6,7,8,3,4,5,6,4,...
where the rows converge to A173524.
(End)
		

Crossrefs

Cf. A173524. - Omar E. Pol, Feb 21 2010
Sum of digits of n written in bases 2-16: A000120, A053735, this sequence, A053824, A053827, A053828, A053829, A053830, A007953, A053831, A053832, A053833, A053834, A053835, A053836.
Related base-4 sequences: A053737, A230631, A230632, A010064, A230633, A230634, A230635, A230636, A230637, A230638, A010065 (trajectory of 1).

Programs

  • Haskell
    a053737 n = if n == 0 then 0 else a053737 m + r where (m, r) = divMod n 4
    -- Reinhard Zumkeller, Mar 19 2015
    
  • MATLAB
    for u=0:104; sol(u+1)=sum(dec2base(u,4)-'0');end
    sol % Marius A. Burtea, Jan 17 2019
  • Magma
    [&+Intseq(n,4):n in [0..104]]; // Marius A. Burtea, Jan 17 2019
    
  • Maple
    A053737 := proc(n)
        add(d,d=convert(n,base,4)) ;
    end proc: # R. J. Mathar, Oct 31 2012
  • Mathematica
    Table[Plus @@ IntegerDigits[n, 4], {n, 0, 100}] (* or *)
    Nest[ Flatten[ #1 /. a_Integer -> {a, a+1, a+2, a+3}] &, {0}, 4] (* Robert G. Wilson v, Jul 27 2006 *)
    DigitSum[Range[0, 100], 4] (* Paolo Xausa, Aug 01 2024 *)
  • PARI
    a(n)=if(n<1,0,if(n%4,a(n-1)+1,a(n/4)))
    
  • PARI
    a(n) = sumdigits(n, 4); \\ Michel Marcus, Aug 24 2019
    

Formula

From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(4n+i) = a(n)+i for 0 <= i <= 3.
a(n) = n - 3*Sum_{k>0} floor(n/4^k) = n - 3*A054893(n). (End)
G.f.: (Sum_{k>=0} (x^(4^k) + 2*x^(2*4^k) + 3*x^(3*4^k))/(1 + x^(4^k) + x^(2*4^k) + x^(3*4^k)))/(1-x). - Franklin T. Adams-Watters, Nov 03 2005
a(n) = A138530(n,4) for n > 3. - Reinhard Zumkeller, Mar 26 2008
a(n) = Sum_{k>=0} A030386(n,k). - Philippe Deléham, Oct 21 2011
a(n) = A007953(A007090(n)). - Reinhard Zumkeller, Mar 19 2015
a(0) = 0; a(n) = a(n - 4^floor(log_4(n))) + 1. - Ilya Gutkovskiy, Aug 23 2019
Sum_{n>=1} a(n)/(n*(n+1)) = 4*log(4)/3 (Shallit, 1984). - Amiram Eldar, Jun 03 2021

A010064 Base 4 self or Colombian numbers (not of form k + sum of base 4 digits of k).

Original entry on oeis.org

1, 3, 8, 13, 18, 20, 25, 30, 35, 37, 42, 47, 52, 54, 59, 64, 73, 78, 83, 85, 90, 95, 100, 102, 107, 112, 117, 119, 124, 129, 138, 143, 148, 150, 155, 160, 165, 167, 172, 177, 182, 184, 189, 194, 203, 208, 213, 215, 220, 225, 230, 232, 237, 242, 247, 249, 254
Offset: 1

Views

Author

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.24, pp. 179-180.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, pp. 384-386.

Crossrefs

Programs

  • Mathematica
    s[n_] := n + Plus @@ IntegerDigits[n, 4]; m = 250; Complement[Range[m], Array[s, m]] (* Amiram Eldar, Nov 28 2020 *)

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

A006064 Smallest junction number with n generators.

Original entry on oeis.org

0, 101, 10000000000001, 1000000000000000000000102
Offset: 1

Views

Author

Keywords

Comments

Strictly speaking, a junction number is a number n with more than one solution to x+digitsum(x) = n. However, it seems best to start this sequence with n=0, for which there is just one solution, x=0. - N. J. A. Sloane, Oct 31 2013.
a(3) = 10^13 + 1 was found by Narasinga Rao, who reports that Kaprekar verified that it is the smallest term. No details of Kaprekar's proof were given.
a(4) = 10^24 + 102 was conjectured by Narasinga Rao.
a(5) = 10^1111111111124 + 102. - Conjectured by Narasinga Rao, confirmed by Max Alekseyev and N. J. A. Sloane.
a(6) = 10^2222222222224 + 10000000000002. - Max Alekseyev
a(7) = 10^( (10^24 + 10^13 + 115) / 9 ) + 10^13 + 2. - Max Alekseyev
a(8) = 10^( (2*10^24 + 214)/9 ) + 10^24 + 103. - Max Alekseyev

Examples

			a(2) = 101 since 101 is the smallest number with two generators: 101 = A062028(91) = A062028(100).
a(4) = 10^24 + 102 = 1000000000000000000000102 has exactly four inverses w.r.t. A062028, namely 999999999999999999999893, 999999999999999999999902, 1000000000000000000000091 and 1000000000000000000000100.
		

References

  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 116.
  • D. R. Kaprekar, The Mathematics of the New Self Numbers, Privately printed, 311 Devlali Camp, Devlali, India, 1963.
  • Narasinga Rao, A. On a technique for obtaining numbers with a multiplicity of generators. Math. Student 34 1966 79--84 (1967). MR0229573 (37 #5147)
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003052, A230093, A230100, A230303, A230857 (highest power of 10).
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.

Formula

a(n) = the smallest m such that there are exactly n solutions to A062028(x)=m.

Extensions

Edited, a(5)-a(6) added by Max Alekseyev, Jun 01 2011
a(1) added, a(5) corrected, a(7)-a(8) added by Max Alekseyev, Oct 26 2013

A010065 a(n+1) = a(n) + sum of digits in base 4 representation of a(n), with a(0) = 1.

Original entry on oeis.org

1, 2, 4, 5, 7, 11, 16, 17, 19, 23, 28, 32, 34, 38, 43, 50, 55, 62, 70, 74, 79, 86, 91, 98, 103, 110, 118, 125, 133, 137, 142, 149, 154, 161, 166, 173, 181, 188, 196, 200, 205, 212, 217, 224, 229, 236, 244, 251, 262, 266, 271, 278, 283, 290, 295
Offset: 0

Views

Author

Keywords

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.24.

Crossrefs

Related base-4 sequences: A053737, A230631, A230632, A010064, A230633, A230634, A230635, A230636, A230637, A230638, A010065 (trajectory of 1)

Programs

  • Haskell
    a010065 n = a010065_list !! n
    a010065_list = iterate a230631 1  -- Reinhard Zumkeller, Mar 20 2015

Formula

a(n+1) = A230631(a(n)). - Reinhard Zumkeller, Mar 20 2015

Extensions

More terms from Neven Juric, Apr 11 2008

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.

A230632 Number of integers m such that m + (sum of digits in base-4 representation of m) = n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Oct 30 2013

Keywords

Comments

Number of occurrences of n in A230631.

Crossrefs

Cf. A230631, A010064 (positions of 0's), A230633-A230635.
Related base-4 sequences: A053737, A230631, A230632, A010064, A230633, A230634,A230635, A230636, A230637, A230638, A010065 (trajectory of 1)

A230631 a(n) = n + (sum of digits in base-4 representation of n).

Original entry on oeis.org

0, 2, 4, 6, 5, 7, 9, 11, 10, 12, 14, 16, 15, 17, 19, 21, 17, 19, 21, 23, 22, 24, 26, 28, 27, 29, 31, 33, 32, 34, 36, 38, 34, 36, 38, 40, 39, 41, 43, 45, 44, 46, 48, 50, 49, 51, 53, 55, 51, 53, 55, 57, 56, 58, 60, 62, 61, 63, 65, 67, 66, 68, 70, 72, 65, 67, 69, 71, 70, 72, 74, 76, 75, 77, 79, 81, 80, 82, 84, 86, 82
Offset: 0

Views

Author

N. J. A. Sloane, Oct 30 2013

Keywords

Crossrefs

Cf. A010064 (missing numbers), A230632 (number of inverses), A230633-A230635.
Related base-4 sequences: A053737, A230632, A010064, A230633, A230634, A230635, A230636, A230637, A230638, A010065 (trajectory of 1)

Programs

Formula

a(n) = A053737(n) + n. - Reinhard Zumkeller, Mar 20 2015

A230633 Numbers n such that m + (sum of digits in base-4 representation of m) = n has exactly one solution.

Original entry on oeis.org

0, 2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 16, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 39, 40, 41, 43, 44, 45, 46, 48, 49, 50, 56, 57, 58, 60, 61, 62, 63, 66, 68, 69, 71, 74, 75, 76, 77, 79, 80, 81, 87, 88, 89, 91, 92, 93, 94, 96, 97, 98, 104, 105, 106, 108, 109, 110, 111, 113, 114, 115, 121, 122, 123, 125, 126, 127
Offset: 1

Views

Author

N. J. A. Sloane, Oct 30 2013

Keywords

Crossrefs

Related base-4 sequences: A053737, A230631, A230632, A010064, A230633, A230634, A230635, A230636, A230637, A230638, A010065 (trajectory of 1)
Showing 1-10 of 18 results. Next