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.

Previous Showing 21-30 of 51 results. Next

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

A027615 Number of 1's when n is written in base -2.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Nov 14 1997

Keywords

Comments

Base -2 is also called "negabinary".
From Jianing Song, Oct 18 2018: (Start)
Define f(n) as: f(0) = 0, f(-2*n) = f(n), f(-2*n+1) = f(n) + 1, then a(n) = f(n), n >= 0. See A320642 for the other half of f.
For k > 0, the earliest occurrence of k is n = A305750(k).
Conjecture: a(n) != A053737(n) if and only if there exists even k >= 4 such that n mod 2^k >= (5*2^(k+1) + 2)/3. If this holds, then the probability of a random chosen number n to satisfy a(n) != A053737(n) is 1/6. (End)

Examples

			A039724(7) = 11011 which has four 1's, so a(7) = 4.
		

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 164.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = a[Quotient[n - 1, -2]] + Mod[n, 2]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jul 23 2023 *)
  • PARI
    a(n) = if(n==0, 0, a(n\(-2))+n%2) /* Jianing Song, Oct 18 2018 */

Formula

a(n) = 3*A072894(n+1) - 2*n - 3. Proof by Nikolaus Meyberg, following a conjecture by Ralf Stephan. - R. J. Mathar, Jan 11 2013
a(n) == n (mod 3). - Jianing Song, Oct 18 2018
a(n) = A000120(A005351(n)). - Michel Marcus, Oct 23 2018

A115362 Row sums of ((1,x) + (x,x^2))^(-1)*((1,x)-(x,x^2))^(-1) (using Riordan array notation).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3
Offset: 0

Views

Author

Paul Barry, Jan 21 2006

Keywords

Comments

Row sums of the matrix product A115358*A115361.
Generalized Ruler Function for k=4. - Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)
a(n) is 1 + the 4-adic valuation of n+1. - Joerg Arndt, Oct 07 2015

Crossrefs

Cf. A053737, A115358, A115361, quadrisection of A235127.

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, 1 + IntegerExponent[n + 1, 4]]; (* Michael Somos, Jul 19 2017 *)
  • PARI
    a(n) = 1 + valuation(n+1,4); \\ Joerg Arndt, Oct 07 2015
    
  • PARI
    {a(n) = if( n<0, 0, n%4==3, 1 + a((n - 3) / 4), 1)}; /* Michael Somos, Jul 13 2017 */
  • Sage
    [(1/3)*(4-sum(n.digits(4))+sum((n-1).digits(4))) for n in [1..96]] # Tom Edgar, Oct 06 2015
    

Formula

G.f.: Sum_{k>=0} x^(4^k)/(1-x^(4^k)). - Frank Ruskey and Chris Deugau (deugaucj(AT)uvic.ca)
Dirichlet g.f. (conjectured): zeta(s)/(1-2^(-2s)). - Ralf Stephan, Mar 27 2015
a(n) = (1/3)*(4 + A053737(n) - A053737(n+1)). - Tom Edgar, Oct 06 2015
a(4*n) = a(4*n+1) = a(4*n+2) = 1, a(4*n+3) = 1+a(n), if n >= 0. - Michael Somos, Jul 13 2017
a(n) = 1 + A235127(1+n). - Antti Karttunen, Nov 18 2017, after Joerg Arndt's Oct 07 2015 comment.

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)

A230634 Numbers n such that m + (sum of digits in base-4 representation of m) = n has exactly two solutions.

Original entry on oeis.org

17, 19, 21, 34, 36, 38, 51, 53, 55, 65, 67, 70, 72, 82, 84, 86, 99, 101, 103, 116, 118, 120, 130, 132, 135, 137, 147, 149, 151, 164, 166, 168, 181, 183, 185, 195, 197, 200, 202, 212, 214, 216, 229, 231, 233, 246, 248, 250, 257, 261, 262, 263, 267, 274, 276, 278, 291, 293, 295, 308, 310, 312, 322, 324, 327, 329, 339
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)

Programs

  • Mathematica
    etsQ[n_]:=Count[#+Total[IntegerDigits[#,4]]&/@Range[n-1],n]==2; Select[ Range[ 350],etsQ] (* Harvey P. Dale, May 25 2016 *)

A230635 Numbers n such that m + (sum of digits in base-4 representation of m) = n has exactly three solutions.

Original entry on oeis.org

16385, 16387, 16402, 16404, 32770, 32772, 32787, 32789, 49155, 49157, 49172, 49174, 65542, 65554, 81922, 81924, 81939, 81941, 98307, 98309, 98324, 98326, 114692, 114694, 114709, 114711, 131079, 131091, 147459, 147461, 147476, 147478, 163844, 163846, 163861
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)

A230636 Numbers n such that m + (sum of digits in base-4 representation of m) = n has exactly four solutions.

Original entry on oeis.org

16777234, 33554451, 50331668, 83886099, 100663316, 117440533, 150994964, 167772181, 184549398, 218103829, 234881046, 251658263, 268435476, 268435478, 285212691, 301989908, 318767125, 352321556, 369098773, 385875990, 419430421, 436207638, 452984855, 486539286
Offset: 1

Views

Author

Donovan Johnson and N. J. A. Sloane, Oct 31 2013

Keywords

Crossrefs

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

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
Previous Showing 21-30 of 51 results. Next