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

A278055 Relative of Hofstadter Q-sequence: a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4, a(5) = 5; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 5.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 44, 45, 45, 46, 47, 48, 48, 49, 50, 50, 51
Offset: 1

Views

Author

Nathan Fox, Nov 10 2016

Keywords

Comments

This sequence is monotonic, with successive terms increasing by 0 or 1. So the sequence hits every positive integer.
A number k appears twice in this sequence if and only if for some i, k is congruent to A057198(i) mod 3^i and k > A057198(i).

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = a[n - a[n -1]] + a[n - a[n -2]] + a[n - a[n -3]]; a[1] = 1; a[2] = 2; a[3] = 3; a[4] = 4; a[5] = 5; Array[a, 71] (* Robert G. Wilson v, Dec 02 2016 *)
  • PARI
    A=Vecsmall([]);
    a(n)=if(n<7, return(n)); if(#ACharles R Greathouse IV, Nov 19 2016

Formula

a(n) ~ 2n/3.

A274058 Relative of Hofstadter Q-sequence: a(n) = max(0, n+32478) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

Original entry on oeis.org

6, 32479, 32480, 32481, 9, 32482, 32483, 32484, 12, 32485, 32486, 32487, 15, 32488, 32489, 17, 32491, 18, 32491, 32493, 32494, 22, 21, 64967, 64961, 9, 18, 64976, 64979, 32487, 22, 32508, 32513, 32491, 27, 36, 32515, 64966, 32482, 39, 32516, 32522
Offset: 1

Views

Author

Nathan Fox, Nov 10 2016

Keywords

Comments

Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 32478 terms.
This sequence has exactly 37025 terms (of positive index). a(37025) = 0, so an attempt to calculate a(37026) would refer to itself.
Without the convention that a(n) = 0 for n <= -32478, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-64942).
If 32478 in this sequence's definition is replaced by any larger number congruent to 5 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n <= 0, Max[0, n + 2^15 - 290], a[n - a[n - 1]] + a[n - a[n - 2]] + a[n - a[n - 3]]]; Array[a, 42] (* Robert G. Wilson v, Mar 19 2017 *)

Formula

If the index is between 67 and 32479 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+32480, a(7n+2) = 7n+32482, a(7n+3) = 7, a(7n+4) = 2n+65001, a(7n+5) = n+64949, a(7n+6) = 32476.

Extensions

Formula and definition corrected by Nathan Fox, Mar 18 2017

A267502 Number of cycles of length 3 of autobiographical numbers (A267491 ... A267498) in base n.

Original entry on oeis.org

0, 3, 0, 0, 0, 3, 9, 18, 45
Offset: 2

Views

Author

Antonia Münchenbach, Jan 28 2016

Keywords

Comments

a(n) is the number of cycles of length 3 of autobiographical numbers in base n. For n>=5, it seems that a(n)=3/2*n^2-33/2*n+45 describes the number of cycles of length 3 in base n. The formula is correct for 5<=n<=11, but unknown for n>11. We assume it's correct for all n>=5.

Examples

			In base two, four, five and six there is no cycle of length 3.
In base three, there is 1 cycle of length 3 with 3 numbers:  10011112, 10101102, 2012112.
In base 10, there are 6 cycles of length 3 (18 numbers).
		

References

  • Antonia Münchenbach and Nicole Anton George, "Eine Abwandlung der Conway-Folge", contribution to "Jugend forscht" 2016, 2016

Crossrefs

Formula

Conjecture: a(n) = 3/2*n^2 - 33/2*n + 45. The formula is correct for 5<=n<=11, but unknown for n>11. We assume it's correct for all n>=5.

A268368 An eventually quasi-quadratic sequence satisfying a Hofstadter-like recurrence.

Original entry on oeis.org

0, 1, 0, 4, 4, 4, 3, 12, 8, 4, 3, 24, 12, 4, 3, 40, 16, 4, 3, 60, 20, 4, 3, 84, 24, 4, 3, 112, 28, 4, 3, 144, 32, 4, 3, 180, 36, 4, 3, 220, 40, 4, 3, 264, 44, 4, 3, 312, 48, 4, 3, 364, 52, 4, 3, 420, 56, 4, 3, 480, 60, 4, 3, 544, 64, 4, 3, 612, 68, 4, 3, 684
Offset: 1

Views

Author

Nathan Fox, Feb 23 2016

Keywords

Comments

a(n) is the solution to the recurrence relation a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)), with the initial conditions: a(n) = 0 if n <= 0; a(1) = 0, a(2) = 1, a(3) = 0, a(4) = 4, a(5) = 4, a(6) = 4, a(7) = 3.

Crossrefs

Programs

  • PARI
    concat(0, Vec(x^2*(1 + 4*x^2 + 4*x^3 + x^4 + 3*x^5 - 4*x^7 - 5*x^8 - 6*x^9 + 3*x^12 + 3*x^13) / ((1 - x)^3*(1 + x)^3*(1 + x^2)^3) + O(x^100))) \\ Colin Barker, Jun 22 2017

Formula

a(2) = 1, a(3) = 0; otherwise a(4n) = 2n^2+2n, a(4n+1) = 4n, a(4n+2) = 4, a(4n+3) = 3.
From Colin Barker, Jun 22 2017: (Start)
G.f.: x^2*(1 + 4*x^2 + 4*x^3 + x^4 + 3*x^5 - 4*x^7 - 5*x^8 - 6*x^9 + 3*x^12 + 3*x^13) / ((1 - x)^3*(1 + x)^3*(1 + x^2)^3).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12) for n>12.
(End)

A373234 Relative of Hofstadter Q-sequence: a(n) = max(0, n+196) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

Original entry on oeis.org

6, 197, 198, 199, 9, 200, 201, 202, 12, 203, 204, 205, 15, 206, 207, 17, 209, 18, 209, 211, 212, 22, 21, 403, 397, 9, 18, 412, 415, 205, 22, 226, 231, 209, 27, 36, 233, 402, 200, 39, 234, 240, 204, 42, 236, 243, 16, 235, 243, 223, 40, 235, 55, 416, 212, 46, 245, 256, 25, 38, 58, 835, 406, 200, 61, 71, 455, 394, 194, 72, 268, 270, 7, 457, 395
Offset: 1

Views

Author

Nathan Fox, May 28 2024

Keywords

Comments

Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 196 terms.
This sequence has exactly 223 terms (of positive index). a(223) = 0, so an attempt to calculate a(224) would refer to itself.
Without the convention that a(n) = 0 for n <= -196, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-378).
If 196 in this sequence's definition is replaced by any larger number congruent to 0 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

Crossrefs

Formula

If the index is between 67 and 195 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+198, a(7n+2) = 7n+200, a(7n+3) = 7, a(7n+4) = 2n+437, a(7n+5) = n+385, a(7n+6) = 194.

A373235 Relative of Hofstadter Q-sequence: a(n) = max(0, n+2087) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

Original entry on oeis.org

6, 2088, 2089, 2090, 9, 2091, 2092, 2093, 12, 2094, 2095, 2096, 15, 2097, 2098, 17, 2100, 18, 2100, 2102, 2103, 22, 21, 4185, 4179, 9, 18, 4194, 4197, 2096, 22, 2117, 2122, 2100, 27, 36, 2124, 4184, 2091, 39, 2125, 2131, 2095, 42, 2127, 2134, 16, 2126, 2134, 2114, 40, 2126, 55, 4198, 2103, 46, 2136, 2147, 25, 38, 58, 8399, 4188
Offset: 1

Views

Author

Nathan Fox, May 28 2024

Keywords

Comments

Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 2087 terms.
This sequence has exactly 2341 terms (of positive index). a(2341) = 0, so an attempt to calculate a(2342) would refer to itself.
Without the convention that a(n) = 0 for n <= -2087, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-4790).
If 2087 in this sequence's definition is replaced by any larger number congruent to 1 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

Crossrefs

Formula

If the index is between 67 and 2085 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+2089, a(7n+2) = 7n+2091, a(7n+3) = 7, a(7n+4) = 2n+4219, a(7n+5) = n+4167, a(7n+6) = 2085.

A373236 Relative of Hofstadter Q-sequence: a(n) = max(0, n+3201) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

Original entry on oeis.org

6, 3202, 3203, 3204, 9, 3205, 3206, 3207, 12, 3208, 3209, 3210, 15, 3211, 3212, 17, 3214, 18, 3214, 3216, 3217, 22, 21, 6413, 6407, 9, 18, 6422, 6425, 3210, 22, 3231, 3236, 3214, 27, 36, 3238, 6412, 3205, 39, 3239, 3245, 3209, 42, 3241, 3248, 16, 3240, 3248, 3228, 40, 3240, 55, 6426, 3217, 46, 3250, 3261, 25, 38, 58, 12855, 6416, 3205
Offset: 1

Views

Author

Nathan Fox, May 28 2024

Keywords

Comments

Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 3201 terms.
This sequence has exactly 3725 terms (of positive index). a(3725) = 0, so an attempt to calculate a(3726) would refer to itself.
Without the convention that a(n) = 0 for n <= -3201, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-6388).
If 3201 in this sequence's definition is replaced by any larger number congruent to 2 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

Crossrefs

Formula

If the index is between 67 and 3199 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+3203, a(7n+2) = 7n+3205, a(7n+3) = 7, a(7n+4) = 2n+6447, a(7n+5) = n+6395, a(7n+6) = 3199.

A373237 Relative of Hofstadter Q-sequence: a(n) = max(0, n+4315) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

Original entry on oeis.org

6, 4316, 4317, 4318, 9, 4319, 4320, 4321, 12, 4322, 4323, 4324, 15, 4325, 4326, 17, 4328, 18, 4328, 4330, 4331, 22, 21, 8641, 8635, 9, 18, 8650, 8653, 4324, 22, 4345, 4350, 4328, 27, 36, 4352, 8640, 4319, 39, 4353, 4359, 4323, 42, 4355, 4362, 16, 4354, 4362, 4342, 40, 4354, 55, 8654, 4331, 46, 4364, 4375, 25, 38, 58, 17311, 8644
Offset: 1

Views

Author

Nathan Fox, May 28 2024

Keywords

Comments

Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 4315 terms.
This sequence has exactly 4875 terms (of positive index). a(4875) = 0, so an attempt to calculate a(4876) would refer to itself.
Without the convention that a(n) = 0 for n <= -4315, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-8616).
If 4315 in this sequence's definition is replaced by any larger number congruent to 3 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

Crossrefs

Formula

If the index is between 67 and 4313 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+4317, a(7n+2) = 7n+4319, a(7n+3) = 7, a(7n+4) = 2n+8675, a(7n+5) = n+8623, a(7n+6) = 4313.

A373238 Relative of Hofstadter Q-sequence: a(n) = max(0, n+200) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

Original entry on oeis.org

6, 201, 202, 203, 9, 204, 205, 206, 12, 207, 208, 209, 15, 210, 211, 17, 213, 18, 213, 215, 216, 22, 21, 411, 405, 9, 18, 420, 423, 209, 22, 230, 235, 213, 27, 36, 237, 410, 204, 39, 238, 244, 208, 42, 240, 247, 16, 239, 247, 227, 40, 239, 55, 424, 216, 46, 249, 260, 25, 38, 58, 851, 414, 204, 61, 71, 463, 402, 198, 72, 272, 274
Offset: 1

Views

Author

Nathan Fox, May 28 2024

Keywords

Comments

Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 200 terms.
This sequence has exactly 220 terms (of positive index). a(220) = 0, so an attempt to calculate a(221) would refer to itself.
Without the convention that a(n) = 0 for n <= -200, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-386).
If 200 in this sequence's definition is replaced by any larger number congruent to 4 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

Crossrefs

Formula

If the index is between 67 and 202 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+202, a(7n+2) = 7n+204, a(7n+3) = 7, a(7n+4) = 2n+445, a(7n+5) = n+393, a(7n+6) = 198.

A373239 Relative of Hofstadter Q-sequence: a(n) = max(0, n+118) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

Original entry on oeis.org

6, 119, 120, 121, 9, 122, 123, 124, 12, 125, 126, 127, 15, 128, 129, 17, 131, 18, 131, 133, 134, 22, 21, 247, 241, 9, 18, 256, 259, 127, 22, 148, 153, 131, 27, 36, 155, 246, 122, 39, 156, 162, 126, 42, 158, 165, 16, 157, 165, 145, 40, 157, 55, 260, 134, 46, 167, 178, 25, 38, 58, 523, 250, 122, 61, 71, 299, 238, 116, 72, 190, 192
Offset: 1

Views

Author

Nathan Fox, May 28 2024

Keywords

Comments

Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 118 terms.
This sequence has exactly 127 terms (of positive index). a(127) = 0, so an attempt to calculate a(128) would refer to itself.
Without the convention that a(n) = 0 for n <= -118, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-222).
If 118 in this sequence's definition is replaced by any larger number congruent to 6 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.

Crossrefs

Formula

If the index is between 67 and 118 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+120, a(7n+2) = 7n+122, a(7n+3) = 7, a(7n+4) = 2n+281, a(7n+5) = n+229, a(7n+6) = 116.
Showing 1-10 of 15 results. Next