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

A303325 T(n,k)=Number of nXk 0..1 arrays with every element equal to 0, 2, 4, 5 or 6 horizontally, diagonally or antidiagonally adjacent elements, with upper left element zero.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 8, 1, 8, 1, 8, 4, 2, 16, 1, 32, 1, 8, 1, 32, 1, 32, 4, 2, 16, 2, 64, 1, 128, 1, 12, 4, 32, 1, 128, 1, 128, 4, 10, 64, 3, 64, 2, 256, 1, 512, 1, 46, 25, 62, 3, 128, 1, 512, 1, 512, 4, 50, 368, 56, 204, 10, 256, 2, 1024, 1, 2048, 1, 204, 201, 758, 136, 744, 9, 512, 1
Offset: 1

Views

Author

R. H. Hardin, Apr 21 2018

Keywords

Comments

Table starts
...1.1...1..1...1....1.....1.....1.......1........1.........1..........1
...2.2...8..8..32...32...128...128.....512......512......2048.......2048
...4.1...4..1...4....1.....4.....1.......4........1.........4..........1
...8.2...8..2..12...10....46....50.....204......290......1034.......1682
..16.1..16..4..64...25...368...201....2545.....1855.....21082......17922
..32.2..32..3..62...56...758...822...11950....15100....206189.....274746
..64.1..64..3.204..136..2956..3929...69328...130531...2005898....4227664
.128.2.128.10.744..531.15494.24759..629227..1489177..33766564...89782726
.256.1.256..9.900.1035.44101.97205.3531980.11297739.359263250.1265799068

Examples

			All solutions for n=5 k=4
..0..0..1..1. .0..0..0..1. .0..1..1..1. .0..1..0..1
..0..0..1..1. .0..0..0..1. .0..1..1..1. .0..1..0..1
..0..1..0..1. .0..1..0..1. .0..1..0..1. .0..1..0..1
..0..0..1..1. .0..0..0..1. .0..1..1..1. .0..1..0..1
..0..0..1..1. .0..0..0..1. .0..1..1..1. .0..1..0..1
		

Crossrefs

Column 1 is A000079(n-1).
Column 3 is A000079(n-1) for n>2.
Row 2 is A158302(n+1).
Row 3 is A010685(n+8).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1)
k=2: a(n) = a(n-2)
k=3: a(n) = 2*a(n-1) for n>3
k=4: [order 55] for n>57
k=5: [order 33] for n>35
Empirical for row n:
n=1: a(n) = a(n-1)
n=2: a(n) = 4*a(n-2)
n=3: a(n) = a(n-2)
n=4: [order 18] for n>19
n=5: [order 34] for n>35

A335949 a(n) = denominator(b_n(x)), where b_n(x) are the polynomials defined in A335947.

Original entry on oeis.org

1, 1, 12, 4, 240, 48, 1344, 192, 3840, 1280, 33792, 3072, 5591040, 430080, 245760, 49152, 16711680, 983040, 522977280, 27525120, 1211105280, 173015040, 1447034880, 62914560, 22900899840, 4580179968, 1409286144, 469762048, 116769423360, 4026531840, 7689065201664
Offset: 0

Views

Author

Peter Luschny, Jul 01 2020

Keywords

Comments

The sequence can also be computed without reference to the Bernoulli polynomials (ultimately thanks to the von Staudt-Clausen theorem) by the method of Kellner and Sondow (2019). Compare the SageMath program.

Crossrefs

Programs

  • SageMath
    def A335949(n):
        a = set(prime_divisors(n + 1)) - set([2])
        b = (
            p
            for p in prime_range(3, (n + 2) // (2 + n % 2))
            if not p.divides(n + 1) and sum((n + 1).digits(base=p)) >= p
        )
        p = list(a.union(set(b)))
        return 4 ^ (n // 2) * mul(p)
    print([A335949(n) for n in range(31)])

Formula

a(n) = min {m | m*([x^k] b(n, x)) is an integer for all k = 0..n}.
The odd part of a(n) is squarefree (A000265).
a(n) and A144845(n) have the same odd prime factors.
a(n)/A144845(n) = 4^floor(n/2)/2 for n >= 1.
a(n)/rad(a(n)) = A158302(n+1), (rad=A007947).

A154388 Triangle T(n,k), 0<=k<=n, read by rows given by [0,1,-1,0,0,0,0,0,0,0,...] DELTA [1,-1,-1,1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Jan 08 2009

Keywords

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 0;
  0, 0, 0, 1;
  0, 0, 0, 1, 0;
  0, 0, 0, 0, 0, 1; ...
		

Formula

Sum_{k=0..n} T(n,k)*x^(n-k) = A135528(n+1), A000012(n), A040001(n), A153284(n+1) for x = 0,1,2,3 respectively.
G.f.: (1+y*x+(y-y^2)*x^2)/(1-y^2*x^2). - Philippe Deléham, Dec 17 2011
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A000012(n), A158302(n) for x = 0, 1, 2 respectively. - Philippe Deléham, Dec 17 2011

A254630 Ascending antidiagonal numerators of the table of repeated differences of A164558(n)/A027642(n).

Original entry on oeis.org

1, 1, 3, 1, 2, 13, 0, 1, 5, 3, -1, -1, 2, 29, 119, 0, -1, -1, 1, 31, 5, 1, 1, -1, -8, -1, 43, 253, 0, 1, 1, 4, -4, -1, 41, 7, -1, -1, -1, 4, 8, 4, -1, 29, 239, 0, -1, -1, -8, -4, 4, 8, 1, 31, 9, 5, 5, 7, -4, -116, -32, -116, -4, 7, 71, 665, 0
Offset: 0

Views

Author

Paul Curtz, Feb 03 2015

Keywords

Comments

The difference table of Bernoulli(n,2) or B(n,2) = A164558(n)/A027642(n) is defined by placing the fractions in the upper row and calculating further rows as the differences of their preceding row:
1, 3/2, 13/6, 3, 119/30, ...
1/2, 2/3, 5/6, 29/30, ...
1/6, 1/6, 2/15, ...
0, -1/30, ...
-1/30, ...
etc.
The first column is A164555(n)/A027642(n).
In particular, the sums of the antidiagonals
1 = 1
1/2 + 3/2 = 2
1/6 + 2/3 + 13/6 = 3
0 + 1/6 + 5/6 + 3 = 4
etc. are the positive natural numbers. (This is rewritten for Bernoulli(n,3) in A157809).
We also have for Bernoulli(.,2)
B(0,2) = 1
B(0,2) + 2*B(1,2) = 4
B(0,2) + 3*B(1,2) + 3*B(2,2) = 12
B(0,2) + 4*B(1,2) + 6*B(2,2) + 4*B(3,2) = 32
etc. with right hand sides provided by A001787.
More generally sum_{s=0..t-1} binomial(t,s)*Bernoulli(s,q) gives A027471(t) for q=3, A002697 for q=4 etc, by reading A104002 downwards the q-th column.

Crossrefs

Cf. A027641, A027642, A074909, A085737, A085738, A104002, A157809, A157920, A157930, A157945, A157946, A157965, A164555, A164558, A190339, A158302, A181131 (numerators and denominators of the main diagonal).

Programs

  • Mathematica
    nmax = 11; A164558 = Table[BernoulliB[n,2], {n, 0, nmax}]; D164558 = Table[ Differences[A164558, n], {n, 0, nmax}]; Table[ D164558[[n-k+1, k+1]] // Numerator, {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 04 2015 *)
Showing 1-5 of 5 results.