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

A073370 Convolution triangle of A001045(n+1) (generalized (1,2)-Fibonacci), n>=0.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 5, 7, 3, 1, 11, 16, 12, 4, 1, 21, 41, 34, 18, 5, 1, 43, 94, 99, 60, 25, 6, 1, 85, 219, 261, 195, 95, 33, 7, 1, 171, 492, 678, 576, 340, 140, 42, 8, 1, 341, 1101, 1692, 1644, 1106, 546, 196, 52, 9, 1
Offset: 0

Views

Author

Wolfdieter Lang, Aug 02 2002

Keywords

Comments

The g.f. for the row polynomials P(n,x) = Sum_{m=0..n} T(n,m)*x^m is 1/(1-(1+x+2*z)*z). See Shapiro et al. reference and comment under A053121 for such convolution triangles.
Riordan array (1/(1-x-2*x^2), x/(1-x-2*x^2)). - Paul Barry, Mar 15 2005
Subtriangle (obtained by dropping the first column) of the triangle given by (0, 1, 2, -2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 19 2013
The number of ternary words of length n having k letters equal 2 and 0,1 avoid runs of odd lengths. - Milan Janjic, Jan 14 2017

Examples

			Triangle begins as:
    1;
    1,   1;
    3,   2,   1;
    5,   7,   3,   1;
   11,  16,  12,   4,   1;
   21,  41,  34,  18,   5,   1;
   43,  94,  99,  60,  25,   6,   1;
   85, 219, 261, 195,  95,  33,   7,   1;
  171, 492, 678, 576, 340, 140,  42,   8,   1;
The triangle (0, 1, 2, -2, 0, 0, ...) DELTA (1, 0, 0, 0, 0, ...) begins:
  1;
  0,  1;
  0,  1,  1;
  0,  3,  2,  1;
  0,  5,  7,  3,  1;
  0, 11, 16, 12,  4,  1;
  0, 21, 41, 34, 18,  5,  1; - _Philippe Deléham_, Feb 19 2013
		

Crossrefs

Columns: A001045 (k=0), A073371 (k=1), A073372 (k=2), A073373 (k=3), A073374 (k=4), A073375 (k=5), A073376 (k=6), A073377 (k=7), A073378 (k=8), A073379 (k=9).
Cf. A002605 (row sums), A006130 (diagonal sums), A073399, A073400.

Programs

  • Magma
    A073370:= func< n,k | (&+[Binomial(n-j,k)*Binomial(n-k-j,j)*2^j: j in [0..Floor((n-k)/2)]]) >;
    [A073370(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 01 2022
    
  • Maple
    # Uses function PMatrix from A357368. Adds a row above and a column to the left.
    PMatrix(10, n -> (2^n - (-1)^n) / 3); # Peter Luschny, Oct 07 2022
  • Mathematica
    T[n_, k_]:= T[n, k]= Sum[Binomial[n-j,k]*Binomial[n-k-j,j]*2^j, {j,0,Floor[(n- k)/2]}];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 01 2022 *)
  • SageMath
    def A073370(n,k): return binomial(n,k)*sum( 2^j * binomial(2*j,j) * binomial(n-k,2*j)/binomial(n,j) for j in range(1+(n-k)//2))
    flatten([[A073370(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Oct 01 2022

Formula

T(n, m) = Sum_{k=0..floor((n-m)/2)} binomial(n-k, m)*binomial(n-m-k, k)*2^k, if n > m, else 0.
Sum_{k=0..n} T(n, k) = A002605(n+1).
T(n, m) = (1*(n-m+1)*T(n, m-1) + 2*2*(n+m)*T(n-1, m-1))/((1^2 + 4*2)*m), n >= m >= 1, T(n, 0) = A001045(n+1), n >= 0, else 0.
T(n, m) = (p(m-1, n-m)*1*(n-m+1)*T(n-m+1) + q(m-1, n-m)*2*(n-m+2)*T(n-m))/(m!*9^m), n >= m >= 1, with T(n) = T(n, m=0) = A001045(n+1), else 0; p(k, n) = Sum_{j=0..k} (A(k, j)*n^(k-j) and q(k, n) = Sum_{j=0..k} B(k, j)*n^(k-j), with the number triangles A(k, m) = A073399(k, m) and B(k, m) = A073400(k, m).
G.f.: 1/(1-(1+2*x)*x)^(m+1) = 1/((1+x)*(1-2*x))^(m+1), m >= 0, for column m (without leading zeros).
T(n, 0) = A001045(n), T(1, 1) = 1, T(n, k) = 0 if k>n, T(n, k) = T(n-1, k-1) + 2*T(n-2, k) + T(n-1, k) otherwise. - Paul Barry, Mar 15 2005
G.f.: (1+x)*(1-2*x)/(1-x-2*x^2-x*y) for the triangle including the 1, 0, 0, 0, 0, ... column. - R. J. Mathar, Aug 11 2015
From Peter Bala, Oct 07 2019: (Start)
Recurrence for row polynomials: R(n,x) = (1 + x)*R(n-1,x) + 2*R(n-2,x) with R(0,x) = 1 and R(1,x) = 1 + x.
The row reverse polynomial x^n*R(n,1/x) is equal to the numerator polynomial of the finite continued fraction 1 + x/(1 - 2*x/(1 + ... + x/(1 - 2*x/(1)))) (with 2*n partial numerators). Cf. A110441. (End)
From G. C. Greubel, Oct 01 2022: (Start)
T(n, k) = binomial(n,k)*Sum_{j=0..floor((n-k)/2)} 2^j*binomial(2*j, j)*binomial(n-k, 2*j)/binomial(n, j).
T(n, k) = binomial(n, k)*Hypergeometric2F1([(k-n)/2, (k-n+1)/2], [-2*n], -8).
Sum_{k=0..n} (-1)^k * T(n, k) = A077957(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A006130(n).
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A000045(n+1). (End)

A130249 Maximal index k of a Jacobsthal number such that A001045(k)<=n (the 'lower' Jacobsthal inverse).

Original entry on oeis.org

0, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 0

Views

Author

Hieronymus Fischer, May 20 2007

Keywords

Comments

Inverse of the Jacobsthal sequence (A001045), nearly, since a(A001045(n))=n except for n=1 (see A130250 for another version). a(n)+1 is equal to the partial sum of the Jacobsthal indicator sequence (see A105348).

Examples

			a(12)=5, since A001045(5)=11<=12, but A001045(6)=21>12.
		

Crossrefs

For partial sums see A130251.
Other related sequences A130250, A130253, A105348, A001045, A130233, A130241.
Cf. A000523, A078008 (runlengths).

Programs

  • Magma
    [Floor(Log(3*n+1)/Log(2)): n in [0..30]]; // G. C. Greubel, Jan 08 2018
    
  • Mathematica
    Table[Floor[Log[2, 3*n + 1]], {n, 0, 50}] (* G. C. Greubel, Jan 08 2018 *)
  • PARI
    for(n=0, 30, print1(floor(log(3*n+1)/log(2)), ", ")) \\ G. C. Greubel, Jan 08 2018
    
  • PARI
    a(n) = logint(3*n+1, 2); \\ Ruud H.G. van Tol, May 12 2024
    
  • Python
    def A130249(n): return (3*n+1).bit_length()-1 # Chai Wah Wu, Jun 08 2022

Formula

a(n) = floor(log_2(3n+1)).
a(n) = A130250(n+1) - 1 = A130253(n) - 1.
G.f.: 1/(1-x)*(Sum_{k>=1} x^A001045(k)).
a(n) = A000523(3*n+1). - Ruud H.G. van Tol, May 12 2024

A265745 a(n) is the number of Jacobsthal numbers (A001045) needed to sum to n using the greedy algorithm.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 17 2015

Keywords

Comments

Sum of digits in "Jacobsthal greedy base", A265747.
It would be nice to know for sure whether this sequence gives also the least number of Jacobsthal numbers that add to n, i.e., that there cannot be even better nongreedy solutions.
The integer 63=21+21+21 has 3 for its 'non-greedy' solution, and a(63) = 5 for its greedy solution 63=43+11+5+3+1. - Yuriko Suwa, Jul 11 2021
Positions where a(n) is different from A372555(n) are n=63, 84, 148, 169, 191, 212, 234, 255, etc. See A372557. - Antti Karttunen, May 07 2024

Examples

			a(0) = 0, because no numbers are needed to form an empty sum, which is zero.
For n=1 we need just A001045(2) = 1, thus a(1) = 1.
For n=2 we need A001045(2) + A001045(2) = 1 + 1, thus a(2) = 2.
For n=4 we need A001045(3) + A001045(2) = 3 + 1, thus a(4) = 2.
For n=6 we form the greedy sum as A001045(4) + A001045(2) = 5 + 1, thus a(6) = 2. Alternatively, we could form the sum as A001045(3) + A001045(3) = 3 + 3, but the number of summands in that case is no less.
For n=7 we need A001045(4) + A001045(2) + A001045(2) = 5 + 1 + 1, thus a(7) = 3.
For n=8 we need A001045(4) + A001045(3) = 5 + 3, thus a(8) = 2.
For n=10 we need A001045(4) + A001045(4) = 5 + 5, thus a(10) = 2.
		

Crossrefs

Cf. A054111 (apparently the positions of the first occurrence of each n > 0).

Programs

  • Mathematica
    jacob[n_] := (2^n - (-1)^n)/3; maxInd[n_] := Floor[Log2[3*n + 1]]; A265745[n_] := A265745[n] = 1 + A265745[n - jacob[maxInd[n]]]; A265745[0] = 0; Array[A265745, 100, 0] (* Amiram Eldar, Jul 21 2023 *)
  • PARI
    A130249(n) = floor(log(3*n + 1)/log(2));
    A001045(n) = (2^n - (-1)^n) / 3;
    A265745(n) = {if(n == 0, 0, my(d = n - A001045(A130249(n))); if(d == 0, 1, 1 + A265745(d)));} \\ Amiram Eldar, Jul 21 2023
  • Python
    def greedyJ(n): n1 = (3*n+1).bit_length() - 1; return (2**n1 - (-1)**n1)//3
    def a(n): return 0 if n == 0 else 1 + a(n - greedyJ(n))
    print([a(n) for n in range(107)]) # Michael S. Branicky, Jul 11 2021
    

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(n - A001045(A130249(n))). [This formula uses a simple greedy algorithm.]

A073371 Convolution of A001045(n+1) (generalized (1,2)-Fibonacci), n >= 0, with itself.

Original entry on oeis.org

1, 2, 7, 16, 41, 94, 219, 492, 1101, 2426, 5311, 11528, 24881, 53398, 114083, 242724, 514581, 1087410, 2291335, 4815680, 10097401, 21126862, 44117867, 91963996, 191384541, 397682154, 825190479, 1710033272, 3539371201, 7317351686
Offset: 0

Views

Author

Wolfdieter Lang, Aug 02 2002

Keywords

Comments

PSumSIGN transform of A045883(n-1). - Michael Somos, Jul 10 2003
Numbers of the form ((6*m+4)*2^m + (-1)^(m-1)*(3*m+4))/27. - Artur Jasinski, Feb 09 2007
With [0, 0, 0] prepended, this is an "autosequence" of the first kind, whose companion is [0, 0, 2, 3, 12, 25, 66, ...], that is A099429. - Jean-François Alcover, Jul 10 2022

Crossrefs

Second (m=1) column of triangle A073370.

Programs

  • Magma
    [((5+3*n)*2^(n+2) + (-1)^n*(7+3*n))/27: n in [0..40]]; // G. C. Greubel, Sep 28 2022
    
  • Mathematica
    Table[((6n+4)*2^n + (-1)^(n-1)(3n+4))/27, {n, 100}] (* Artur Jasinski, Feb 09 2007 *)
  • PARI
    a(n) = if(n<-3, 0, ((5+3*n)*2^(n+2)+(7+3*n)*(-1)^n)/27)
    
  • SageMath
    def A073371(n): return ((5+3*n)*2^(n+2) + (-1)^n*(7+3*n))/27
    [A073371(n) for n in range(40)] # G. C. Greubel, Sep 28 2022

Formula

a(n) = Sum_{k=0..n} b(k) * b(n-k), where b(k) = A001045(k+1).
a(n) = Sum_{k=0..floor(n/2)} (n-k+1) * binomial(n-k, k) * 2^k.
a(n) = ((n+1)*U(n+1) + 4*(n+2)*U(n))/9 with U(n) = A001045(n+1), n>=0.
G.f.: 1/(1 - (1+2*x)*x)^2.
G.f.: 1/((1+x)*(1-2*x))^2.
a(n) = ((5+3*n)*2^(n+2) + (7+3*n)*(-1)^n)/27.
a(n) = ((6*n+4)*2^(n) + (-1)^(n-1)*(3*n+4))/27. - Artur Jasinski, Feb 09 2007
E.g.f.: (1/27)*(4*(5+6*x)*exp(2*x) + (7-3*x)*exp(-x)). - G. C. Greubel, Sep 28 2022

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 08 2007

A128209 Jacobsthal numbers(A001045) + 1.

Original entry on oeis.org

1, 2, 2, 4, 6, 12, 22, 44, 86, 172, 342, 684, 1366, 2732, 5462, 10924, 21846, 43692, 87382, 174764, 349526, 699052, 1398102, 2796204, 5592406, 11184812, 22369622, 44739244, 89478486, 178956972, 357913942, 715827884, 1431655766, 2863311532, 5726623062
Offset: 0

Views

Author

Paul Barry, Feb 19 2007

Keywords

Comments

Row sums of A128208.
Essentially the same as A052953. - R. J. Mathar, Jun 14 2008
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n >= 1, a(n+1) is the number of different representations of matrix P^(-1)+I+P by sum of permutation matrices. - Vladimir Shevelev, Apr 12 2010
a(n) is the rank of Fibonacci(n+2) in row n of A049456 (regarded as an irregular triangle read by rows). - N. J. A. Sloane, Nov 23 2016

References

  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3(1992),15-19. [From Vladimir Shevelev, Apr 12 2010]

Crossrefs

Programs

Formula

a(n) = 1 + 2^n/3 - (-1)^n/3.
G.f.: (1-3*x^2)/(1 - 2*x - x^2 + 2*x^3).

A130253 Number of Jacobsthal numbers (A001045) <=n.

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, May 20 2007

Keywords

Comments

Partial sums of the Jacobsthal indicator sequence (A105348).
For n<>1, we have a(A001045(n))=n+1.

Examples

			a(9)=5 because there are 5 Jacobsthal numbers <=9 (0,1,1,3 and 5).
		

Crossrefs

For partial sums see A130252. Other related sequences A001045, A130249, A130250, A130253, A105348. Also A130233, A130235, A130241, A108852, A130245.

Programs

Formula

a(n) = floor(log_2(3n+1)) + 1 = ceiling(log_2(3n+2)).
a(n) = A130249(n) + 1 = A130250(n+1).
G.f.: 1/(1-x)*(Sum_{k>=0} x^A001045(k)).

A154879 Third differences of the Jacobsthal sequence A001045.

Original entry on oeis.org

3, -2, 4, 0, 8, 8, 24, 40, 88, 168, 344, 680, 1368, 2728, 5464, 10920, 21848, 43688, 87384, 174760, 349528, 699048, 1398104, 2796200, 5592408, 11184808, 22369624, 44739240, 89478488, 178956968, 357913944, 715827880, 1431655768, 2863311528, 5726623064
Offset: 0

Views

Author

Paul Curtz, Jan 16 2009

Keywords

Comments

Second differences of A078008. First differences of the sequence (-1)^(n+1)*A084247(n).

Crossrefs

Cf. A115341.

Programs

  • Magma
    [(1/3)*(8*(-1)^n+2^n): n in [0..35]]; // Vincenzo Librandi, Jul 24 2011
    
  • Mathematica
    Differences[LinearRecurrence[{1,2},{0,1},40],3] (* or *) LinearRecurrence[ {1,2},{3,-2},40] (* Harvey P. Dale, Apr 20 2018 *)
  • Python
    def A154879(n): return ((1<2 else (3,-2,4)[n] # Chai Wah Wu, Apr 18 2025

Formula

a(n) + a(n+1) = A000079(n), n > 1.
a(n+3) = 8*A001045(n) = 4*A078008(n+1) = 2*A097073(n+1).
From R. J. Mathar, Jan 23 2009: (Start)
a(n) = a(n-1) + 2*a(n-2).
G.f.: (3-5*x)/((1+x)*(1-2*x)). (End)

Extensions

Edited and extended by R. J. Mathar, Jan 23 2009
Typo in A-number in formula corrected by R. J. Mathar, Feb 23 2009

A322942 Jacobsthal triangle, coefficients of orthogonal polynomials J(n, x) where J(n, 0) are the Jacobsthal numbers (A001045 with a(0) = 1). Triangle read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 5, 3, 1, 5, 12, 10, 4, 1, 11, 27, 28, 16, 5, 1, 21, 62, 75, 52, 23, 6, 1, 43, 137, 193, 159, 85, 31, 7, 1, 85, 304, 480, 456, 290, 128, 40, 8, 1, 171, 663, 1170, 1254, 916, 480, 182, 50, 9, 1, 341, 1442, 2793, 3336, 2750, 1652, 742, 248, 61, 10, 1
Offset: 0

Views

Author

Peter Luschny, Jan 03 2019

Keywords

Comments

The name 'Jacobsthal triangle' used here is not standard.

Examples

			The first few polynomials are:
  J(0, x) = 1;
  J(1, x) = x + 1;
  J(2, x) = x^2 + 2*x + 1;
  J(3, x) = x^3 + 3*x^2 +  5*x + 3;
  J(4, x) = x^4 + 4*x^3 + 10*x^2 + 12*x + 5;
  J(5, x) = x^5 + 5*x^4 + 16*x^3 + 28*x^2 + 27*x + 11;
  J(6, x) = x^6 + 6*x^5 + 23*x^4 + 52*x^3 + 75*x^2 + 62*x + 21;
The triangle starts:
  [0]   1;
  [1]   1,   1;
  [2]   1,   2,    1;
  [3]   3,   5,    3,    1;
  [4]   5,  12,   10,    4,   1;
  [5]  11,  27,   28,   16,   5,   1;
  [6]  21,  62,   75,   52,  23,   6,   1;
  [7]  43, 137,  193,  159,  85,  31,   7,  1;
  [8]  85, 304,  480,  456, 290, 128,  40,  8, 1;
  [9] 171, 663, 1170, 1254, 916, 480, 182, 50, 9, 1;
		

Crossrefs

Row sums are A152035, alternating row sums are A000007, values at x=1/2 are A323232, values at x=0 (first column) are A152046.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30);
    g:= func< n,x | (&+[Binomial(n-k,k)*2^k*(x+1)^(n-2*k): k in [0..Floor(n/2)]]) >;
    f:= func< n,x | n le 1 select (x+1)^n else g(n,x) - 2*g(n-2,x) >;
    A322942:= func< n,k | Coefficient(R!( f(n,x) ), k) >;
    [A322942(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 20 2023
  • Maple
    J := proc(n) option remember;
    `if`(n < 3, [1, x+1, x^2 + 2*x + 1][n+1], (x+1)*J(n-1) + 2*J(n-2));
    sort(expand(%)) end: seq(print(J(n)), n=0..11); # Computes the polynomials.
    seq(seq(coeff(J(n), x, k), k=0..n), n=0..11);
  • Mathematica
    J[n_, x_]:= J[n, x]= If[n<3, (x+1)^n, (x+1)*J[n-1, x] + 2*J[n-2, x]];
    T[n_, k_]:= Coefficient[J[n, x], x, k];
    Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, Jun 17 2019 *)
    (* Second program *)
    A322942[n_, k_]:= Coefficient[Series[Boole[n==0] + (I*Sqrt[2])^n*(ChebyshevU[n, (x+1)/(2*Sqrt[2]*I)] + ChebyshevU[n-2, (x+ 1)/(2*Sqrt[2]*I)]), {x,0,50}], x, k];
    Table[A322942[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 20 2023 *)
  • Sage
    # use[riordan_square from A321620]
    riordan_square((2*x^2 - 1)/((x + 1)*(2*x - 1)), 9)
    

Formula

J(n, x) = (x+1)*J(n-1, x) + 2*J(n-2, x) for n >= 3.
T(n, k) = [x^k] J(n, x).
Equals the Riordan square (cf. A321620) generated by (2*x^2-1)/((x + 1)*(2*x - 1)).
Sum_{k=0..n} T(n, k) = A152035(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A000007(n).
From G. C. Greubel, Sep 20 2023: (Start)
T(n, k) = [x^k]( [n=0] + (i*sqrt(2))^n*(ChebyshevU(n, (x+1)/(2*sqrt(2)*i)) + ChebyshevU(n-2, (x+1)/(2*sqrt(2)*i))) ).
G.f.: (1 - 2*t^2)/(1 - (x+1)*t - 2*t^2).
Sum_{k=0..floor(n/2)} T(n-k, k) = (2/3)*[n=0] + A006138(n-1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = 2*[n=0] + Fibonacci(n-2). (End)

A049883 Primes in the Jacobsthal sequence (A001045).

Original entry on oeis.org

3, 5, 11, 43, 683, 2731, 43691, 174763, 2796203, 715827883, 2932031007403, 768614336404564651, 201487636602438195784363, 845100400152152934331135470251, 56713727820156410577229101238628035243
Offset: 1

Views

Author

Keywords

Comments

All terms, except a(2) = 5, are of the form (2^p + 1)/3 - the Wagstaff primes A000979 = {3, 11, 43, 683, 2731, 43691, 174763, ...}.
Indices of prime Jacobsthal numbers are listed in A107036 = {3, 4, 5, 7, 11, 13, 17, 19, 23, 31, 43, 61, ...}.
For n > 1, A107036(n) = A000978(n) (numbers m such that (2^m + 1)/3 is prime). - Alexander Adamchuk, Oct 10 2006

Crossrefs

Programs

A130250 Minimal index k of a Jacobsthal number such that A001045(k) >= n (the 'upper' Jacobsthal inverse).

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, May 20 2007

Keywords

Comments

Inverse of the Jacobsthal sequence (A001045), nearly, since a(A001045(n))=n except for n=2 (see A130249 for another version). a(n+1) is equal to the partial sum of the Jacobsthal indicator sequence (see A105348).

Examples

			a(10)=5 because A001045(5) = 11 >= 10, but A001045(4) = 5 < 10.
		

Crossrefs

For partial sums see A130252.

Programs

  • Magma
    [0] cat [Ceiling(Log(2,3*n-1)): n in [1..120]]; // G. C. Greubel, Mar 18 2023
    
  • Mathematica
    Table[If[n==0, 0, Ceiling[Log[2, 3*n-1]]], {n,0,120}] (* G. C. Greubel, Mar 18 2023 *)
  • Python
    def A130250(n): return (3*n-2).bit_length() if n else 0 # Chai Wah Wu, Apr 17 2025
  • SageMath
    def A130250(n): return 0 if (n==0) else ceil(log(3*n-1, 2))
    [A130250(n) for n in range(121)] # G. C. Greubel, Mar 18 2023
    

Formula

a(n) = ceiling(log_2(3n-1)) = 1 + floor(log_2(3n-2)) for n >= 1.
a(n) = A130249(n-1) + 1 = A130253(n-1) for n >= 1.
G.f.: (x/(1-x))*Sum_{k>=0} x^A001045(k).
Showing 1-10 of 721 results. Next