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-5 of 5 results.

A086893 a(n) is the index of F(n+1) at the unique occurrence of the ordered pair of reversed consecutive terms (F(n+1),F(n)) in Stern's diatomic sequence A002487, where F(k) denotes the k-th term of the Fibonacci sequence A000045.

Original entry on oeis.org

1, 3, 5, 13, 21, 53, 85, 213, 341, 853, 1365, 3413, 5461, 13653, 21845, 54613, 87381, 218453, 349525, 873813, 1398101, 3495253, 5592405, 13981013, 22369621, 55924053, 89478485, 223696213, 357913941, 894784853, 1431655765, 3579139413
Offset: 1

Views

Author

John W. Layman, Sep 18 2003

Keywords

Comments

If the Fibonacci pairs are kept in the natural order (F(n),F(n+1)), it appears that the first term of the pair occurs in A002487 at the index given by A061547(n).
Equals row sums of triangle A177954. - Gary W. Adamson, May 15 2010
Starting at n=3, begin subtracting from (2^(n-1)-1)/2^(n-1): 3/4 - 1/2 = 1/4 with 1+4=5=a(3); 7/8 - 1/4 = 5/8 with 5+8=13=a(4); 15/16 - 5/8 = 5/16 with 5+16=21= a(5); 31/32 - 5/16 = 21/32 with 21+32=53=a(6); 63/64 - 21/32 = 21/64 with 21+64=85=a(7) and so on. For n odd in the first fraction (2^(n-1)-1)/2^(n-1), the result approaches 1/3, and for n even in the first fraction, the result approaches 2/3. - J. M. Bergot, May 08 2015
Also, the decimal representation of the x-axis, from the left edge to the origin, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 678", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. See A283641. - Robert Price, Mar 12 2017

Examples

			A002487 begins 0,1,1,2,1,3,2,... with offset 0. Thus a(1)=1 since (F(2),F(1)) = (1,1) occurs at term 1 of A002487. Similarly, a(2)=3 and a(3)=5, since (F(3),F(2))=(2,1) occurs at term 3 and (F(4),F(3))=(3,2) at term 5 of A002487.
		

Crossrefs

Interleaving of A002450\{0} and A072197.
Positive terms of A096773 in ascending order.
Partial sums of A158302.

Programs

  • Magma
    [2^(n-1)*(3-(-1)^n/3)-1/3: n in [0..35]]; // Vincenzo Librandi, May 09 2015
    
  • Mathematica
    f[n_] := Module[{a = 1, b = 0, m = n}, While[m > 0, If[OddQ@ m, b = a + b, a = a + b]; m = Floor[m/2]]; b]; a = Table[f[n], {n, 0, 10^6}]; b = Reverse /@ Partition[Map[Fibonacci, Range[Ceiling@ Log[GoldenRatio, Max@ a] + 1]], 2, 1]; Map[If[Length@ # > 0, #[[1, 1]] - 1, 0] &@ SequencePosition[a, #] &, b] (* Michael De Vlieger, Mar 15 2017, Version 10.1, after Jean-François Alcover at A002487 *)
  • PARI
    a(n)=if(n%2,2^(n+1),2^(n+1)+2^(n-1))\3 \\ Charles R Greathouse IV, May 08 2015
    
  • Python
    def A086893(n): return (1<Chai Wah Wu, Apr 29 2024

Formula

It appears that a(n)=(4^((n+1)/2)-1)/3 if n is odd and a(n)=(a(n-1)+a(n+1))/2 if n is even.
G.f.: (1+2*x-2*x^2)/((1-x)*(1-4*x^2)); a(n) = 2^(n-1)(3-(-1)^n/3)-1/3 (offset 0); a(n) = Sum{k=0..n+1, 4^floor(k/2)/2} (offset 0); a(2n) = A002450(n+1) (offset 0); a(2n+1) = A072197(n) (offset 0). - Paul Barry, May 21 2004
a(n+2) = 4*a(n) + 1, a(1) = 1, a(2) = 3, n > 0. - Yosu Yurramendi, Mar 07 2017
a(n+1) = a(n) + A158302(n), a(1) = 1, n > 0. - Yosu Yurramendi, Mar 07 2017

Extensions

More terms from Paul Barry, May 21 2004

A372285 Array read by upward antidiagonals: A(n,k) is the number of terms of A086893 in the interval [b(n, k), b(n+1, k)], n,k >= 1, where b = A372282.

Original entry on oeis.org

5, 9, 4, 17, 9, 7, 33, 17, 13, 2, 65, 33, 25, 5, 4, 129, 65, 49, 10, 6, 3, 257, 129, 97, 22, 13, 6, 6, 513, 257, 193, 45, 26, 14, 13, 3, 1025, 513, 385, 89, 54, 29, 25, 4, 4, 2049, 1025, 769, 177, 109, 57, 49, 9, 10, 3, 4097, 2049, 1537, 353, 217, 113, 97, 22, 21, 6, 9, 8193, 4097, 3073, 705, 433, 225, 193, 45, 41, 13, 17, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 27 2024

Keywords

Examples

			Array begins:
n\k|    1     2      3     4     5     6      7     8      9    10     11
---+----------------------------------------------------------------------
1  |    5,    4,     7,    2,    4,    3,     6,    3,     4,    3,     9,
2  |    9,    9,    13,    5,    6,    6,    13,    4,    10,    6,    17,
3  |   17,   17,    25,   10,   13,   14,    25,    9,    21,   13,    33,
4  |   33,   33,    49,   22,   26,   29,    49,   22,    41,   26,    65,
5  |   65,   65,    97,   45,   54,   57,    97,   45,    81,   54,   129,
6  |  129,  129,   193,   89,  109,  113,   193,   89,   161,  109,   257,
7  |  257,  257,   385,  177,  217,  225,   385,  177,   321,  217,   513,
8  |  513,  513,   769,  353,  433,  449,   769,  353,   641,  433,  1025,
9  | 1025, 1025,  1537,  705,  865,  897,  1537,  705,  1281,  865,  2049,
10 | 2049, 2049,  3073, 1409, 1729, 1793,  3073, 1409,  2561, 1729,  4097,
11 | 4097, 4097,  6145, 2817, 3457, 3585,  6145, 2817,  5121, 3457,  8193,
12 | 8193, 8193, 12289, 5633, 6913, 7169, 12289, 5633, 10241, 6913, 16385,
etc.
The count includes also the starting and/or ending point, if either of them is a term of A086893. For example, when going from A372282(2,1) = 21 to A372282(3,1) = 5461, we count terms A086893(5..13) = [21, 53, 85, 213, 341, 853, 1365, 3413, 5461], nine in total, therefore A(2,1) = 9.
When going from A371102(1,8) = 15 to A371102(2,8) = 93, we count terms 21, 53, 85 of A086893 in the interval [15, 93], therefore A(1,8) = 3.
		

Crossrefs

Programs

  • PARI
    up_to = 78;
    A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3); \\ From A086893
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372282sq(n,k) = if(1==n,2*k-1,A371094(A372282sq(n-1,k)));
    A372286(n) = { my(u=A371094(n), k1); for(i=1,oo,if(A086893(i)>=n,k1=i-1; break)); for(i=k1,oo,if(A086893(i)>u,return(i-k1-1))); };
    A372285sq(n,k) = A372286(A372282sq(n,k));
    A372285list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372285sq((a-(col-1)),col))); (v); };
    v372285 = A372285list(up_to);
    A372285(n) = v372285[n];

Formula

A(n, k) = A372286(A372282(n, k)).

A372352 The difference between n and the largest term of A086893 <= n.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6
Offset: 1

Views

Author

Antti Karttunen (proposed by Ali Sada), Apr 29 2024

Keywords

Comments

The terms a(n) grow from 0 (whenever n is in A086893) by 1 until the next element of A086893 is reached. - M. F. Hasler, May 08 2025

Crossrefs

Cf. also A372286.

Programs

Formula

a(n) = n - max ( A086893 intersect [1..n] ) (= 0 iff n in A086893). - M. F. Hasler, May 08 2025

A372355 Array read by upward antidiagonals: A(n,k) = A372285(1+n, k)-A372285(n, k), n,k >= 1.

Original entry on oeis.org

4, 8, 5, 16, 8, 6, 32, 16, 12, 3, 64, 32, 24, 5, 2, 128, 64, 48, 12, 7, 3, 256, 128, 96, 23, 13, 8, 7, 512, 256, 192, 44, 28, 15, 12, 1, 1024, 512, 384, 88, 55, 28, 24, 5, 6, 2048, 1024, 768, 176, 108, 56, 48, 13, 11, 3, 4096, 2048, 1536, 352, 216, 112, 96, 23, 20, 7, 8, 8192, 4096, 3072, 704, 432, 224, 192, 44, 40, 13, 16, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 29 2024

Keywords

Examples

			Array begins:
n\k|    1     2      3     4     5     6      7     8      9    10     11    12
---+----------------------------------------------------------------------------
1  |    4,    5,     6,    3,    2,    3,     7,    1,     6,    3,     8,    3,
2  |    8,    8,    12,    5,    7,    8,    12,    5,    11,    7,    16,    9,
3  |   16,   16,    24,   12,   13,   15,    24,   13,    20,   13,    32,   15,
4  |   32,   32,    48,   23,   28,   28,    48,   23,    40,   28,    64,   28,
5  |   64,   64,    96,   44,   55,   56,    96,   44,    80,   55,   128,   56,
6  |  128,  128,   192,   88,  108,  112,   192,   88,   160,  108,   256,  112,
7  |  256,  256,   384,  176,  216,  224,   384,  176,   320,  216,   512,  224,
8  |  512,  512,   768,  352,  432,  448,   768,  352,   640,  432,  1024,  448,
9  | 1024, 1024,  1536,  704,  864,  896,  1536,  704,  1280,  864,  2048,  896,
10 | 2048, 2048,  3072, 1408, 1728, 1792,  3072, 1408,  2560, 1728,  4096, 1792,
11 | 4096, 4096,  6144, 2816, 3456, 3584,  6144, 2816,  5120, 3456,  8192, 3584,
12 | 8192, 8192, 12288, 5632, 6912, 7168, 12288, 5632, 10240, 6912, 16384, 7168,
		

Crossrefs

Columnwise first differences of A372285.
Cf. also A372353.

Programs

A372452 Number of terms of A086893 in the interval [A372444(n), A372444(1+n)].

Original entry on oeis.org

2, 6, 10, 21, 41, 80, 162, 324, 646, 1294, 2586, 5173, 10345, 20691, 41381, 82760, 165522, 331044, 662089, 1324177, 2648353, 5296707, 10593413, 21186827, 42373652, 84747305, 169494609, 338989216, 677978435, 1355956869, 2711913736, 5423827472, 10847654948, 21695309896, 43390619791, 86781239586, 173562479173, 347124958344
Offset: 0

Views

Author

Antti Karttunen, May 05 2024

Keywords

Comments

The formula involving A372451 and A372453 shows that each term is at most +-1 from the corresponding term of A372451, that are the first differences of A372449.

Examples

			Between A372444(0)=27 and A372444(1)=165 there are two terms (53 and 85) of A086893, therefore a(0) = 2.
Between A372444(1)=165 and A372444(2)=8021 there are six terms (213, 341, 853, 1365, 3413, 5461) of A086893, therefore a(1) = 6.
Between A372444(2)=8021 and A372444(3)=12408149 there are 10 terms (13653, 21845, 54613, 87381, 218453, 349525, 873813, 1398101, 3495253, 5592405) of A086893, therefore a(2) = 10.
		

Crossrefs

Programs

Formula

a(n) = A372286(A372444(n)).
a(n) = A372451(n) + [A372453(n)<=0] - [A372453(1+n)<0], where [ ] is the Iverson bracket, yielding 1 or 0 depending on whether the given inequivalence holds or does not hold.
Showing 1-5 of 5 results.