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 11-14 of 14 results.

A051135 a(n) = number of times n appears in the Hofstadter-Conway $10000 sequence A004001.

Original entry on oeis.org

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

Views

Author

Robert Lozyniak (11(AT)onna.com)

Keywords

Comments

If the initial 2 is changed to a 1, the resulting sequence (A265332) has the property that if all 1's are deleted, the remaining terms are the sequence incremented. - Franklin T. Adams-Watters, Oct 05 2006
a(A088359(n)) = 1 and a(A087686(n)) > 1; first differences of A188163. - Reinhard Zumkeller, Jun 03 2011
From Robert G. Wilson v, Jun 07 2011: (Start)
a(k)=1 for k = 3, 5, 6, 9, 10, 11, 13, 17, 18, 19, 20, 22, 23, 25, 28, ..., ; (A088359)
a(k)=2 for k = 1, 2, 7, 12, 14, 21, 24, 26, 29, 38, 42, 45, 47, 51, 53, ..., ; (1 followed by A266109)
a(k)=3 for k = 4, 15, 27, 30, 48, 54, 57, 61, 86, 96, 102, 105, 112, ..., ; (A267103)
a(k)=4 for k = 8, 31, 58, 62, 106, 116, 120, 125, 192, 212, 222, 226, ..., ;
a(k)=5 for k = 16, 63, 121, 126, 227, 242, 247, 253, 419, 454, 469, ..., ;
a(k)=6 for k = 32, 127, 248, 254, 475, 496, 502, 509, 894, 950, 971, ..., ;
a(k)=7 for k = 64, 255, 503, 510, 978, 1006, 1013, 1021, 1872, 1956, ..., ;
a(k)=8 for k = 128, 511, 1014, 1022, 1992, 2028, 2036, 2045, 3864, ..., ;
a(k)=9 for k = 256, 1023, 2037, 2046, 4029, 4074, 4083, 4093, 7893, ..., ;
a(k)=10 for k = 512, 2047, 4084, 4094, 8113, 8168, 8178, 8189, ..., . (End)
Compare above to array A265903. - Antti Karttunen, Jan 18 2016

Crossrefs

Cf. A088359 (positions of ones).
Cf. A265332 (essentially the same sequence, but with a(1) = 1 instead of 2).

Programs

  • Haskell
    import Data.List (group)
    a051135 n = a051135_list !! (n-1)
    a051135_list = map length $ group a004001_list
    -- Reinhard Zumkeller, Jun 03 2011
    
  • Magma
    nmax:=200;
    h:=[n le 2 select 1 else Self(Self(n-1)) + Self(n - Self(n-1)): n in [1..5*nmax]]; // h = A004001
    A188163:= function(n)
       for j in [1..3*nmax+1] do
           if h[j] eq n then return j; end if;
       end for;
    end function;
    A051135:= func< n | A188163(n+1) - A188163(n) >;
    [A051135(n): n in [1..nmax]]; // G. C. Greubel, May 20 2024
    
  • Maple
    a[1]:=1: a[2]:=1: for n from 3 to 300 do a[n]:=a[a[n-1]]+a[n-a[n-1]] od: A:=[seq(a[n],n=1..300)]:for j from 1 to A[nops(A)-1] do c[j]:=0: for n from 1 to 300 do if A[n]=j then c[j]:=c[j]+1 else fi od: od: seq(c[j],j=1..A[nops(A)-1]); # Emeric Deutsch, Jun 06 2006
  • Mathematica
    a[1] = 1; a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; t = Array[a, 250]; Take[ Transpose[ Tally[t]][[2]], 105] (* Robert G. Wilson v, Jun 07 2011 *)
  • SageMath
    @CachedFunction
    def h(n): return 1 if (n<3) else h(h(n-1)) + h(n - h(n-1)) # h=A004001
    def A188163(n):
        for j in range(1,2*n+1):
            if h(j)==n: return j
    def A051135(n): return A188163(n+1) - A188163(n)
    [A051135(n) for n in range(1,201)] # G. C. Greubel, May 20 2024
  • Scheme
    (define (A051135 n) (- (A188163 (+ 1 n)) (A188163 n))) ;; Antti Karttunen, Jan 18 2016
    

Formula

From Antti Karttunen, Jan 18 2016: (Start)
a(n) = A188163(n+1) - A188163(n). [after Reinhard Zumkeller's Jun 03 2011 comment above]
Other identities:
a(n) = 1 if and only if A093879(n-1) = 1. [See A188163 for a reason.]
(End)

Extensions

More terms from Jud McCranie
Added links (in parentheses) to recently submitted related sequences - Antti Karttunen, Jan 18 2016

A267103 Row 3 of A265903; numbers that occur exactly three times in A004001.

Original entry on oeis.org

4, 15, 27, 30, 48, 54, 57, 61, 86, 96, 102, 105, 112, 115, 119, 124, 157, 172, 182, 188, 191, 202, 208, 211, 218, 221, 225, 233, 236, 240, 245, 251, 293, 314, 329, 339, 345, 348, 364, 374, 380, 383, 394, 400, 403, 410, 413, 417, 429, 435, 438, 445, 448, 452, 460, 463, 467, 472, 481, 484, 488, 493, 499, 506, 558
Offset: 1

Views

Author

Antti Karttunen, Jan 18 2016

Keywords

Comments

Numbers n for which A051135(n) = 3.

Crossrefs

Column 3 of A265901, row 3 of A265903.

Formula

a(n) = A087686(1+A266109(n)) = A087686(1+A087686(1+A188163(n))).

A087873 a(n)=a(a(n-1))+a(n-a(n-1)) p(a(n))=n, b(n)=p(p(n-1))+a(n-a(n-1)).

Original entry on oeis.org

1, 1, 6, 10, 10, 27, 18, 19, 22, 33, 34, 35, 36, 39, 40, 43, 49, 65, 66, 67, 68, 69, 72, 73, 74, 77, 78, 81, 87, 88, 91, 97, 107, 129, 130, 131, 132, 133, 134, 137, 138, 139, 140, 143, 144, 145, 148, 149, 152, 158, 159, 160, 163, 164, 167, 173, 174, 177, 183, 193
Offset: 1

Views

Author

Roger L. Bagula, Oct 11 2003

Keywords

Comments

The BASIC program implements a(n) = A188163(A188163(n-1))+a(abs(n-a(n-1))) , which does not work as soon as n=5, because a(5) appears at the left and at the right hand side of the equation. This also differs from the recurrence quoted in the NAME section. Another apparent source of confusion is that a(n) in the NAME is probably meant to read A004001(n). Perhaps (but this is not clear), the b(n) in the NAME was thought to define the current sequence, but a(n) = A188163(A188163(n-1)) + A004001(abs(n-A004001(n-1)) gives a different sequence. - R. J. Mathar, May 15 2013

Crossrefs

Cf. A004001.

A371555 Smallest position m such that A005350(m)=n.

Original entry on oeis.org

1, 4, 6, 9, 10, 14, 15, 17, 22, 23, 24, 26, 29, 35, 36, 37, 39, 40, 42, 45, 49, 56, 57, 58, 59, 61, 62, 64, 67, 68, 70, 73, 77, 82, 90, 91, 92, 93, 95, 96, 97, 99, 100, 102, 105, 106, 108, 111, 115, 116, 118, 121, 125, 130, 136, 145, 146, 147, 148, 149, 151, 152, 153, 155
Offset: 1

Views

Author

R. J. Mathar, Mar 27 2024

Keywords

Comments

Greedy inverse of A005350.

Crossrefs

Programs

  • Maple
    A371555 := proc(n)
        local a;
        for a from 1 do
            if A005350(a) = n then
                return a;
            end if;
        end do:
    end proc:
    seq(A371555(n),n=1..100);
  • Mathematica
    r = 0; a[1] = a[2] = a[3] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; Reap[Do[If[a[n] > r, Sow[n]; r = a[n]], {n, 155}]][[-1, 1]] (* Michael De Vlieger, Mar 27 2024, after Jean-François Alcover at A005350 *)
Previous Showing 11-14 of 14 results.