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 41-50 of 210 results. Next

A087740 a(n) = 1 + abs(A004001(A005185(n)) - A005185(A004001(n))).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Oct 01 2003

Keywords

Comments

A "commutator" between the Hofstadter A005185 sequence and the Conway-Hofstadter A004001 sequence.

Crossrefs

Cf. A004001, A005185, A284019 (compare the scatter plots).
Cf. also A286560.

Programs

  • Mathematica
    Conway[n_Integer?Positive] := Conway[n] =Conway[Conway[n-1]] + Conway[n - Conway[n-1]] Conway[1] = Conway[2] = 1 Hofstadter[n_Integer?Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-2]] Hofstadter[1] = Hofstadter[2] = 1 digits=200 a=Table[1+Abs[Conway[Hofstadter[n]]-Hofstadter[Conway[n]]], {n, 1, digits}]
  • Scheme
    (define (A087740 n) (+ 1 (abs (- (A004001 (A005185 n)) (A005185 (A004001 n)))))) ;; Scheme-code for A004001 and A005185 given under those entries.

Extensions

Data section extended to 120 terms by Antti Karttunen, May 22 2017

A088493 a(n) = Sum_{k=1..8} floor(p(n, k)/p(n-1, k)), where p(n, k) = n!/( Product_{i=1..floor(n/2^k)} A004001(i) ).

Original entry on oeis.org

16, 24, 32, 40, 45, 56, 60, 72, 73, 88, 81, 104, 101, 120, 108, 136, 129, 152, 129, 168, 157, 184, 141, 200, 185, 216, 178, 232, 213, 248, 188, 264, 241, 280, 226, 296, 269, 312, 222, 328, 297, 344, 273, 360, 325, 376, 237, 392, 353, 408, 321, 424, 381, 440
Offset: 2

Views

Author

Roger L. Bagula, Nov 10 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Conway[n_]:= Conway[n]= If[n<3, 1, Conway[Conway[n-1]] +Conway[n-Conway[n-1]]];
    f[n_, k_]:= f[n, k]= Product[Conway[i], {i, Floor[n/2^k]}];
    a[n_]:= a[n]= Sum[Floor[n*f[n-1,k]/f[n,k]], {k,8}];
    Table[a[n], {n, 2, 70}] (* modified by G. C. Greubel, Mar 27 2022 *)
  • Sage
    @CachedFunction
    def b(n): # A004001
        if (n<3): return 1
        else: return b(b(n-1)) + b(n-b(n-1))
    def f(n,k): return product( b(j) for j in (1..(n//2^k)) )
    def A088493(n): return sum( (n*f(n-1,k)//f(n,k)) for k in (1..8) )
    [A088493(n) for n in (2..70)] # G. C. Greubel, Mar 27 2022

Formula

a(n) = Sum_{k=1..8} floor(p(n, k)/p(n-1, k)), where p(n, k) = n!/( Product_{i=1..floor(n/2^k)} A004001(i) ).

Extensions

Edited by G. C. Greubel, Mar 27 2022

A095902 Number of odd entries in A004001 that are <= 2^n.

Original entry on oeis.org

1, 2, 2, 3, 6, 12, 27, 55, 115, 235, 490, 994, 2008, 4036, 8120, 16280, 32640, 65344, 130879, 261935, 524057, 1048301, 2096855, 4193951, 8388239, 16776799, 33554339, 67109539, 134220995
Offset: 0

Views

Author

Robert G. Wilson v, Jun 12 2004

Keywords

Comments

Even entries and odd entries are equal only when n=4, 6 and 12. Past that, the evens outnumber the odds.

Crossrefs

Programs

  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; c = 0; k = 1; Do[ While[k <= 2^n, If[ Mod[ a[k], 2] == 1, c++ ]; k++ ]; Print[c], {n, 21}]
  • Scheme
    (define (A095902 n) (A283480 (A000079 n))) ;; Antti Karttunen, Mar 21 2017

Formula

a(n) = A283480(2^n) - Antti Karttunen, Mar 21 2017

Extensions

a(22)-a(28) from Donovan Johnson, Jan 28 2009

A120474 Second differences of A004001.

Original entry on oeis.org

1, -1, 1, 0, -1, 0, 1, 0, 0, -1, 1, -1, 0, 0, 1, 0, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, -1, 1, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 1, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, -1, 1, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, 0, 0, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 1, -1, 0, 0, 1
Offset: 1

Views

Author

Roger L. Bagula, Jul 06 2006

Keywords

Comments

Takes values in {0,1,-1}.

Crossrefs

Cf. A004001. First differences of A093879.

Programs

  • Mathematica
    Differences[#, 2] &@ Nest[Append[#1, #1[[#1[[-1]] ]] + #1[[#2 - #1[[-1]] ]] ] & @@ {#, Length@ # + 1} &, {1, 1}, 105] (* Michael De Vlieger, Nov 05 2018 *)

Formula

a(n) = A004001(n+2) - 2*A004001(n+1) + A004001(n) = A093879(n+1) - A093879(n).

Extensions

Edited by N. J. A. Sloane, Oct 01 2006

A172452 Partial products of A004001.

Original entry on oeis.org

1, 1, 1, 2, 4, 12, 48, 192, 768, 3840, 23040, 161280, 1128960, 9031680, 72253440, 578027520, 4624220160, 41617981440, 416179814400, 4577977958400, 54935735500800, 659228826009600, 8569974738124800, 119979646333747200, 1679715048672460800, 25195725730086912000, 377935885951303680000
Offset: 0

Views

Author

Roger L. Bagula, Feb 03 2010

Keywords

Programs

  • Mathematica
    f[n_]:= f[n]= If[n<3, Fibonacci[n], f[f[n-1]] + f[n-f[n-1]]]; (* f = A004001 *)
    a[n_]:= Product[f[j], {j,n}];
    Table[a[n], {n,0,35}] (* modified by G. C. Greubel, Apr 27 2021 *)
  • Sage
    @CachedFunction
    def b(n): return fibonacci(n) if (n<3) else b(b(n-1)) + b(n-b(n-1)) # b=A004001
    def a(n): return product(b(j) for j in (1..n))
    [a(n) for n in (0..35)] # G. C. Greubel, Apr 27 2021

Extensions

Definition simplified - The Assoc. Editors of the OEIS, Feb 24 2010
More terms added by G. C. Greubel, Apr 27 2021

A266348 a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 1, 2, 3, 3, 4, 4, 4, 4, 1, 2, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 11, 11, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 15, 16, 16, 16, 17, 18, 19, 19, 20, 21, 21
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2016

Keywords

Comments

When the terms are arranged as successively larger batches of 2^n, the terms A(n,k), k = 1 .. 2^n, on row n give the cumulative number of 1's encountered since the beginning of the row n of similarly organized irregular table A265754, up to and including the k-th term on that row:
1;
1, 1;
1, 2, 2, 2;
1, 2, 3, 3, 4, 4, 4, 4;
1, 2, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8;
...

Crossrefs

Programs

  • Mathematica
    lim = 100; b[1] = 1; b[2] = 1; b[n_] := b[n] = b[b[n - 1]] + b[n - b[n - 1]]; s = CoefficientList[Series[1/(2 - 2 x) (2 x - x^2 + Sum[ 2^(k - 1) x^2^k, {k, Floor@ Log2@ lim}]), {x, 0, lim}], x]; {1}~Join~Table[b[n + 1] - s[[n + 1]], {n, 2, lim}] (* Michael De Vlieger, Jan 26 2016, after Robert G. Wilson v at A004001 *)
  • Scheme
    (define (A266348 n) (if (= 1 n) 1 (- (A004001 (+ 1 n)) (A072376 n))))

Formula

a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n) = A004001(n+1) - 2^(A000523(n)-1).

A266399 a(n) = A188163(A088359(n)); positions where A004001 obtains unique values.

Original entry on oeis.org

5, 9, 10, 17, 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, 194, 197, 203, 213, 228, 257, 258, 259, 260, 261
Offset: 1

Views

Author

Antti Karttunen, Jan 18 2016

Keywords

Comments

Numbers n for which A004001(n-1) < A004001(n) < A004001(n+1).

Crossrefs

Cf. A004001.
Subsequence of A088359 and A188163.
Cf. also A266188.

Formula

a(n) = A188163(A088359(n)) = A088359(A088359(n)-1) = A188163(A188163(1+n)).
Other identities. For all n >= 1:
A004001(a(n)) = A088359(n).

A266640 Reversed reduced frequency counts for A004001: a(n) = A265754(A054429(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 22 2016

Keywords

Comments

Deleting all 1's and decrementing the remaining terms by one gives the sequence back.

Examples

			Illustration how the sequence can be constructed by concatenating the reversed reduced frequency counts R_n of each successive level n of A004001-tree:
                              1
                             / \
                            2   1
                           /|\   \
              ____________3 2 1   1
             /    /    /  | |\ \   \
    ________4  __3    2   1 2 1 1   1
   / / / / /  / /|   /|   | |\ \ \   \
  5 4 3 2 1  3 2 1  2 1   1 2 1 1 1   1
etc.
		

Crossrefs

Cf. A000079 (positions of records, where n appears for the first time).
Cf. A265754 (obtained from the mirror image of the same tree).

Programs

Formula

a(n) = A265754(A054429(n)).
Other identities. For all n >= 0:
a(2^n) = n+1.

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))).

A269851 a(0) = 1, a(A087686(1+n)) = 2*a(n), a(A088359(n)) = A250469(a(n)), where A088359 and A087686 = numbers that occur only once (resp. more than once) in A004001.

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 5, 6, 16, 21, 25, 7, 18, 15, 10, 12, 32, 45, 55, 49, 11, 42, 51, 35, 50, 27, 14, 36, 33, 30, 20, 24, 64, 93, 115, 91, 121, 13, 90, 123, 125, 77, 110, 147, 65, 98, 39, 22, 84, 105, 85, 102, 87, 70, 100, 57, 54, 28, 72, 69, 66, 60, 40, 48, 128, 189, 235, 203, 187, 169, 17, 186, 267, 305, 217, 143, 230
Offset: 0

Views

Author

Antti Karttunen, Mar 07 2016

Keywords

Comments

Permutation of natural numbers obtained from the sieve of Eratosthenes, combined with the permutation obtained from Hofstadter-Conway $10000 sequence (A004001). Note the indexing: Domain starts from 0, range from 1.

Crossrefs

Inverse: A269852.
Related or similar permutations: A252755, A267111, A269855.

Formula

a(0) = 1, a(1) = 2, for n > 1, if A093879(n-1) = 0 [when n is in A087686], a(n) = 2*a(n - A004001(n)), otherwise [when n is in A088359], a(n) = A250469(a(A004001(n)-1)).
As a composition of related permutations:
a(n) = A252755(A267111(n)).
Other identities. For all n >= 0:
a(2^n) = 2^(n+1).
Previous Showing 41-50 of 210 results. Next