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

A340494 Index where n first appears in A340488.

Original entry on oeis.org

1, 3, 6, 8, 16, 18, 21, 23, 56, 58, 61, 63, 71, 73, 76, 78, 216, 218, 221, 223, 231, 233, 236, 238, 271, 273, 276, 278, 286, 288, 291, 293, 856, 858, 861, 863, 871, 873, 876, 878, 911, 913, 916, 918, 926, 928, 931, 933, 1071, 1073, 1076, 1078, 1086, 1088, 1091
Offset: 0

Views

Author

N. J. A. Sloane, Jan 10 2021

Keywords

Comments

The first differences appear to be some kind of ruler sequence separated by 2's.
indeed, the first differences look like n -> f(A001511(n)) with f = (2, 3, 8, 33, 138, 563, 2268, 9093, 36398, 145623, 582528, 2330153, 9320658, etc.). See A340495. - Rémy Sigrist, Jan 10 2021

Crossrefs

Programs

  • PARI
    See Links section.

Formula

The generating function appears to be
1/(1-x ) + 2*x/(1-x)^2 + (1/(1-x))*Sum_{t>=1} x^(2^t)*(g(t+1)-g(t))/(1-x^(2^t)),
where g = {g(t): t >= 1} = 2,3,8,33,138,... has g.f. x*(2*x-1)*(2*x^2+5*x-2)/((1-x)^2*(1-4*x)). - Rémy Sigrist and N. J. A. Sloane, Jan 10 2021

Extensions

More terms from Rémy Sigrist, Jan 10 2021

A340500 a(n) = maximum among first n terms of A340488.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15
Offset: 1

Views

Author

N. J. A. Sloane, Jan 11 2021

Keywords

Comments

The scatterplot evokes Cantor staircase function. - Rémy Sigrist, Jan 13 2021

Crossrefs

Cf. A340488.

Programs

  • PARI
    See Links section.

Formula

Apparently, a(n) AND A340488(n) = A340488(n) (where AND denotes the bitwise AND operator). - Rémy Sigrist, Jan 13 2021

A340496 Partial sums of A340488.

Original entry on oeis.org

0, 0, 1, 2, 2, 4, 6, 9, 12, 14, 14, 17, 18, 21, 21, 25, 29, 34, 39, 43, 49, 55, 62, 69, 75, 79, 86, 91, 98, 102, 102, 107, 113, 118, 119, 121, 122, 127, 127, 133, 135, 141, 144, 151, 154, 160, 160, 167, 169, 176, 177, 181, 182, 189, 189, 197, 205, 214, 223, 231, 241, 251, 262, 273, 283, 291
Offset: 1

Views

Author

N. J. A. Sloane, Jan 10 2021

Keywords

Crossrefs

Cf. A340488.

A340497 Index where 2*n first appears in A340488.

Original entry on oeis.org

1, 6, 16, 21, 56, 61, 71, 76, 216, 221, 231, 236, 271, 276, 286, 291, 856, 861, 871, 876, 911, 916, 926, 931, 1071, 1076, 1086, 1091, 1126, 1131, 1141, 1146, 3416, 3421, 3431, 3436, 3471, 3476, 3486, 3491, 3631, 3636, 3646, 3651, 3686, 3691, 3701, 3706, 4271, 4276, 4286
Offset: 0

Views

Author

N. J. A. Sloane, Jan 11 2021

Keywords

Comments

A bisection of A340494. Note that there is a conjectured g.f. for A340494.

Crossrefs

A340499 First differences of A340488.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 11 2021

Keywords

Comments

Absolute values initially agree with A336033 but differ starting at term 32.

Crossrefs

A340498 Where 2^n appears in A340488 for the first time.

Original entry on oeis.org

3, 6, 16, 56, 216, 856, 3416, 13656, 54616, 218456, 873816, 3495256, 13981016, 55924056, 223696216, 894784856, 3579139416, 14316557656, 57266230616, 229064922456, 916259689816
Offset: 0

Views

Author

N. J. A. Sloane, Jan 11 2021

Keywords

Comments

A subsequence of A340494 and A340497. Note that A340494 has a conjectured g.f.

Crossrefs

Programs

  • C
    See Links section.

Extensions

a(8)-a(20) from Rémy Sigrist, Jan 11 2021

A336033 a(n) is the number of k such that 1 <= k < n and a(k) XOR ... XOR a(n-1) = 0 (where XOR denotes the bitwise XOR operator).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 07 2020

Keywords

Comments

This sequence has fractal features; each time the sequence hits a new power of 2, say a(m) = 2^k for the first time, then a(m + i) = a(i) for i = 1..m and a(2*m + 1) = 1 + a(m).
These are (a strong conjecture) the "y" values from A340488. - Rémy Sigrist, Jan 11 2021

Examples

			The first terms, alongside the corresponding k's, are:
  n   a(n)  k's
  --  ----  -------
   1     0  {}
   2     1  {1}
   3     0  {}
   4     1  {3}
   5     2  {1, 2}
   6     0  {}
   7     1  {6}
   8     0  {}
   9     1  {8}
  10     2  {6, 7}
  11     3  {1, 2, 5}
  12     2  {8, 9}
		

Crossrefs

Programs

  • PARI
    for (n=1, #a=vector(87), x=0; forstep (k=n-1, 1, -1, if (0==x=bitxor(x, a[k]), a[n]=1+a[k]; break)); print1 (a[n] ", "))

A340495 Records in first differences of A340494.

Original entry on oeis.org

2, 3, 8, 33, 138, 563, 2268, 9093, 36398, 145623, 582528, 2330153, 9320658, 37282683, 149130788, 596523213, 2386092918, 9544371743, 38177487048, 152709948273, 610839793178, 2443359172803
Offset: 1

Views

Author

Rémy Sigrist and N. J. A. Sloane, Jan 10 2021

Keywords

Crossrefs

Programs

  • C
    See Links section.

Formula

The sequence a(n)-4*a(n-1) appears to be -5, -4, 1, 6, 11, 16, 21, 26, 31, 36, 41, 46, ... which is essentially 5*k+1 (k >= -1). The sequence itself appears to have g.f. =
x*(2*x-1)*(2*x^2+5*x-2)/((1-x)^2*(1-4*x)).

A343332 a(1) = 0; thereafter a(n+1) = floor((a(n)+y)/2), where y is the number of numbers m < n such that a(m) = a(n).

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Apr 12 2021

Keywords

Comments

Variant of A340488, with XOR(a,y) replaced by floor((a+y)/2).
Every number appears, and their first occurrences are in increasing order.
Apparently, a(n) <= A343333(n) for all n.

Crossrefs

Programs

  • Python
    def A343332_list(n_max):
      a=0
      a_list=[0]
      count=[]
      for i in range(n_max-1):
        if a==len(count): count.append(0)
        else: count[a]+=1
        a=(a+count[a])//2
        a_list.append(a)
      return a_list

A343333 a(1) = 0; thereafter a(n+1) = ceiling((a(n)+y)/2), where y is the number of numbers m < n such that a(m) = a(n).

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Apr 12 2021

Keywords

Comments

Variant of A340488, with XOR(a,y) replaced by ceiling((a+y)/2).
Every number appears, and their first occurrences are in increasing order.
Apparently, a(n) >= A343332(n) for all n.

Crossrefs

Programs

  • Python
    def A343333_list(n_max):
      a=0
      a_list=[0]
      count=[]
      for i in range(n_max-1):
        if a==len(count): count.append(0)
        else: count[a]+=1
        a=(a+count[a]+1)//2
        a_list.append(a)
      return a_list
Showing 1-10 of 12 results. Next