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 31-40 of 246 results. Next

A284478 a(n) = A005185(n) - A055748(n).

Original entry on oeis.org

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

Views

Author

Altug Alkan, Mar 27 2017

Keywords

Examples

			a(4) = 1 because a(4) = A005185(4) - A055748(4) = 3 - 2 = 1.
		

Crossrefs

Programs

  • Maple
    A005185:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc:
    A005185(1):= 1: A005185(2):= 1:
    A055748:= proc(n) option remember; procname(procname(n-1)) +procname(n-procname(n-2)-1) end proc:
    A055748(1):= 1: A055748(2):= 1:
    A284478:= map(A005185 - A055748, [$1..1000]):
    A284478:= seq(A284478[i], i=1..1000); # Altug Alkan, Apr 01 2017
  • Mathematica
    a[n_] := a[n] = If[n < 3, 1, a[n - a[n - 1]] + a[n - a[n - 2]]]; b[n_] := b[n] = If[n < 3, 1, b[b[n - 1]] + b[n - b[n - 2] - 1]]; Array[a[#] - b[#] &, 96] (* Michael De Vlieger, Mar 29 2017 *)
  • PARI
    q=vector(1000); c=vector(1000); q[1]=q[2]=1; for(n=3, #q, q[n]=(q[n-q[n-1]]+q[n-q[n-2]])); c[1]=c[2]=1; for(n=3, #c, c[n]=(c[c[n-1]]+c[n-c[n-2]-1])); va = vector(1000, n, q[n]-c[n])

A317161 Let b(1) = b(2) = 1; for n >= 3, b(n) = n - b(t(n)) - b(n-t(n)) where t = A005185. a(n) = 2*b(n) - n.

Original entry on oeis.org

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

Views

Author

Altug Alkan, Aug 07 2018

Keywords

Comments

If there is a limiting value l such that lim_{n->infinity} b(n)/n = lim_{n->infinity} t(n)/n = l, then l = 1/2. So this sequence has definition a(n) = 2*b(n) - n.

Crossrefs

Programs

  • Mathematica
    Block[{t = NestWhile[Function[{a, n}, Append[a, a[[n - a[[-1]] ]] + a[[n - a[[-2]] ]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, Last@ # < 65 &], b}, b = NestWhile[Function[{b, n}, Append[b, n - b[[t[[n]] ]] - b[[n - t[[n]] ]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, Length@ # < Length@ t &]; Array[2 b[[#]] - # &, Length@ b] ] (* Michael De Vlieger, Aug 08 2018 *)
  • PARI
    t=vector(99); t[1]=t[2]=1; for(n=3, #t, t[n] = t[n-t[n-1]]+t[n-t[n-2]]); b=vector(99); b[1]=b[2]=1; for(n=3, #b, b[n] = n-b[t[n]]-b[n-t[n]]); vector(99, k, 2*b[k]-k)

A327284 Indices of terms of the Hofstadter Q-sequence (A005185) not used in generating a later term.

Original entry on oeis.org

1, 216, 361, 429, 451, 599, 766, 774, 775, 778, 792, 793, 820, 849, 863, 882, 968, 1042, 1111, 1215, 1216, 1228, 1407, 1524, 1528, 1542, 1543, 1550, 1551, 1573, 1653, 1672, 1673, 1674, 1675, 1863, 1905, 1920, 1938, 1954, 2078, 2185, 2186, 2187, 2195, 2196, 2277
Offset: 1

Views

Author

Benjamin Chaffin, Sep 15 2019

Keywords

Comments

Each term of the Q-sequence is the sum of two previous terms. This sequence gives the Q-sequence terms which appear never to be used as one of those two. In other words, a(n) != x - A005185(x-1), and a(n) != x - A005185(x-2).

Crossrefs

A362257 a(n) = 2*Q(n) - n, where Q(n) is Hofstadter's Q-sequence A005185.

Original entry on oeis.org

1, 0, 1, 2, 1, 2, 3, 2, 3, 2, 1, 4, 3, 2, 5, 2, 3, 4, 3, 4, 3, 2, 1, 8, 3, 2, 5, 4, 3, 2, 9, 2, 1, 6, 7, 2, 3, 6, 3, 4, 5, 4, 5, 4, 3, 2, 1, 16, -1, 0, 9, 4, -1, 6, 5, 0, 7, 2, 5, 4, 3, 2, 17, 2, -3, 10, 3, -2, 9, 10, 3, 4, 7, 4, 5, 2, 7, 2, 3, 6, 7, 4, 3, 8
Offset: 1

Views

Author

Nathan Fox and Alexis Ducote, Apr 13 2023

Keywords

Comments

Just as for A005185, it is not known if this sequence exists for all n.
A005185 and this sequence exist as long |a(n)| remains less than n.

Crossrefs

Programs

Formula

a(1) = 1, a(2) = 0; a(n) = (1/2)*(3 - a(n-1) - a(n-2)) + a((1/2)*(n + 1 - a(n-1))) + a((1/2)*(n + 2 - a(n-2))) for n >= 3.

A076267 Numbers n such that A005185(n) divides n.

Original entry on oeis.org

1, 2, 50, 56, 128, 156, 166, 208, 238, 272, 308, 336, 392, 474, 476, 512, 618, 658, 666, 710, 734, 836, 868, 1016, 1064, 1376, 1386, 1424, 1432, 1832, 2216, 2280, 2334, 2606, 2638, 2676, 2700, 2740, 2782, 2786, 2912, 2922, 2948, 2954, 3758, 4260, 4632
Offset: 1

Views

Author

Benoit Cloitre, Nov 05 2002

Keywords

Comments

Is a(n)/n^2 bounded ?
Superset of A027619. [R. J. Mathar, Sep 21 2008]

Examples

			The 56th term of the Hofstadter Q-sequence is 28, which divides 56, hence 56 is in the sequence.
		

Crossrefs

Cf. A005185.

A087720 Repeated terms in A005185.

Original entry on oeis.org

1, 3, 5, 6, 8, 11, 12, 14, 16, 17, 23, 24, 30, 32, 43, 47, 48, 54, 60, 72, 80, 83, 84, 92, 94, 96, 148, 172, 175, 178, 185, 186, 192, 215, 222, 228, 230, 252, 273, 301, 308, 338, 350, 372, 380, 382, 384, 408, 468, 517, 574, 593, 624, 673, 678, 738, 748, 762, 764, 789
Offset: 1

Views

Author

Roger L. Bagula, Sep 29 2003

Keywords

Crossrefs

Cf. A005185.

Programs

  • Mathematica
    digits=30000;
    Hofstadter[n_Integer?Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-2]];
    Hofstadter[1] = Hofstadter[2] = 1;
    a1=Table[Hofstadter[n], {n, 1, digits}];
    b=Table[If[a1[[n]]-a1[[n-1]]==0, a1[[n]], 0], {n, 2, digits}];
    c=Delete[Union[b], 1]

A087721 Strictly increasing domain of A005185.

Original entry on oeis.org

2, 3, 4, 5, 6, 8, 10, 11, 12, 16, 20, 21, 22, 23, 24, 25, 30, 32, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 52, 54, 56, 58, 60, 61, 62, 64, 66, 68, 71, 72, 73, 77, 78, 79, 80, 82, 83, 85, 87, 88, 90, 91, 92, 93, 94, 96, 101, 106, 108, 109, 111, 114, 115, 118, 120, 122, 123
Offset: 1

Views

Author

Roger L. Bagula, Sep 29 2003

Keywords

Crossrefs

Programs

  • Mathematica
    digits=750;
    Hofstadter[n_Integer?Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-2]];
    Hofstadter[1] = Hofstadter[2] = 1;
    a1=Table[Hofstadter[n], {n, digits}];
    f[x_, y_] := x-y/; x-y>0;
    f[x_, y_] := 0/; x-y<=0;
    b=Table[If[f[a1[[n]], a1[[n-1]]]>0, a1[[n]], 0], {n, 2, digits}];
    c=Delete[Union[b], 1]

A087742 a(n) = 1+Abs[Prime[A005185[n]]-A005185[Prime[n]]].

Original entry on oeis.org

2, 1, 1, 1, 2, 2, 2, 1, 2, 4, 8, 2, 5, 6, 6, 4, 4, 2, 5, 1, 4, 5, 7, 8, 3, 6, 2, 2, 8, 2, 4, 5, 13, 7, 8, 9, 13, 6, 15, 9, 12, 11, 8, 18, 6, 22, 26, 2, 24, 24, 8, 14, 32, 17, 31, 29, 21, 23, 13, 21, 18, 6, 12, 29, 28, 4, 23, 39, 11, 3, 21, 17, 14, 24, 20, 26, 20, 57, 10, 20, 23, 28, 40, 36, 30
Offset: 1

Views

Author

Roger L. Bagula, Oct 01 2003

Keywords

Comments

A "commutator" between the Hofstadter A005185 sequence and the primes.

Crossrefs

Programs

  • Mathematica
    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[Prime[Hofstadter[n]]-Hofstadter[Prime[n]]], {n, 1, digits}]

Extensions

Edited by N. J. A. Sloane, Nov 08 2005

A087753 a(n) = least k such that A005185(k)=n; or 0 if there is no such k.

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 0, 12, 16, 15, 18, 20, 0, 25, 0, 24, 32, 0, 36, 31, 35, 38, 41, 43, 50, 53, 0, 52, 0, 51, 65, 48, 64, 0, 67, 0, 71, 66, 69, 63, 79, 77, 80, 81, 86, 84, 87, 90, 0, 104, 0, 98, 110, 99, 116, 100, 125, 108, 0, 105, 123, 114, 129, 96, 139, 115, 0, 118, 142, 0, 126
Offset: 1

Views

Author

Roger L. Bagula, Oct 02 2003

Keywords

Crossrefs

Cf. A005185.

Extensions

Edited by N. J. A. Sloane, Nov 08 2005

A088492 a(2n+1)=2n+1, a(2n) = floor(2*n/A005185(n)), a weighted inverse of Hofstadter's Q-sequence.

Original entry on oeis.org

2, 3, 4, 5, 3, 7, 2, 9, 3, 11, 3, 13, 2, 15, 3, 17, 3, 19, 3, 21, 3, 23, 3, 25, 3, 27, 3, 29, 3, 31, 3, 33, 3, 35, 3, 37, 3, 39, 3, 41, 3, 43, 3, 45, 3, 47, 3, 49, 3, 51, 3, 53, 3, 55, 3, 57, 3, 59, 3, 61, 3, 63, 3, 65, 3, 67, 3, 69, 3, 71, 3, 73, 3, 75, 3, 77, 3, 79, 3, 81, 3, 83, 3, 85, 3, 87
Offset: 2

Views

Author

Roger L. Bagula, Nov 10 2003

Keywords

Comments

Define a sequence of partial products of Hofstadters Q-sequence, H(n) = prod_{i=1..n} A005185(i) = 1, 1, 2, 6, 18, 72, 360, 1800,.. for n>=1 (which differs from A004395).
The original definition was equivalent to a(n) = [n *H([(n-1)/2])/H([n/2])] where [..] is the floor function.
A consequence of this construction is a(2n+1)=2n+1 at the odd indices. At the even indices, a(2*n) = [2*n*H(n-1)/H(n)] = [2*n/A005185(n)], which is used to simplify the definition.
a(2n)=3 for 8<=n<=48. The first 5 at an even index occurs at a(2*193)=5.

Crossrefs

Cf. A005185.

Programs

  • Mathematica
    Hofstadter[n_Integer?Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-2]] Hofstadter[1] = Hofstadter[2] = 1 p[n_]=n!/Product[Hofstadter[i], {i, 1, Floor[n/2]}] digits=200 a0=Table[Floor[p[n]/p[n-1]], {n, 2, digits}]

Extensions

Definition replaced and comment added - R. J. Mathar, Dec 08 2010
Previous Showing 31-40 of 246 results. Next