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

A034299 Alternating sum transform (PSumSIGN) of A000975.

Original entry on oeis.org

1, 1, 4, 6, 15, 27, 58, 112, 229, 453, 912, 1818, 3643, 7279, 14566, 29124, 58257, 116505, 233020, 466030, 932071, 1864131, 3728274, 7456536, 14913085, 29826157, 59652328, 119304642, 238609299
Offset: 0

Views

Author

Keywords

Examples

			G.f. = 1 + x + 4*x^2 + 6*x^3 + 15*x^4 + 27*x^5 + 58*x^6 + 112*x^7 + ...
		

Crossrefs

Cf. A160156.

Programs

  • Magma
    [(2^(n+5)+(6*n+13)*(-1)^n-9)/36: n in [0..50]]; // G. C. Greubel, Oct 12 2017
  • Mathematica
    CoefficientList[Series[(1/(1-x^2))/(1-x-2x^2),{x,0,40}],x] (* Vincenzo Librandi, Apr 04 2012 *)
    Table[(2^(n + 5) + (6 n + 13) (-1)^n - 9)/36, {n, 0, 28}] (* Bruno Berselli, Apr 04 2012 *)
    LinearRecurrence[{1,3,-1,-2},{1,1,4,6},30] (* Harvey P. Dale, Jun 11 2019 *)
  • PARI
    {a(n) = (32 * 2^n - 9 + (6*n + 13) * (-1)^n) / 36}; /* Michael Somos, Jan 23 2014 */
    

Formula

a(n) = sum{k=0..floor(n/2), A001045(n-2k+1)}. - Paul Barry, Nov 24 2003
G.f.: (1/(1-x^2))/(1-x-2x^2); a(n) = sum{k=0..n+1, A001045(k)*(1-(-1)^floor((n+k)/2))}; - Paul Barry, Apr 16 2005
a(n) = sum_{k, 0<=k<=n} A126258(n,k). - Philippe Deléham, Mar 13 2007
a(n) = 2*a(n-1)+A001057(n+1), with a(0)=1. - Bruno Berselli, Nov 09 2010
a(n) = (2^(n+5)+(6n+13)(-1)^n-9)/36. - Bruno Berselli, Apr 04 2012
a(n) = a(n-1) + 2*a(n-2) + (1 + (-1)^n) / 2. - Michael Somos, Jan 23 2014
A160156(n) = a(2*n). - Michael Somos, Oct 16 2020

A364214 Numbers whose canonical representation as a sum of distinct Jacobsthal numbers (A280049) is palindromic.

Original entry on oeis.org

1, 2, 4, 5, 6, 10, 12, 15, 18, 21, 22, 30, 34, 42, 44, 49, 58, 63, 66, 71, 80, 85, 86, 102, 110, 126, 130, 146, 154, 170, 172, 183, 198, 209, 218, 229, 244, 255, 258, 269, 284, 295, 304, 315, 330, 341, 342, 374, 390, 422, 430, 462, 478, 510, 514, 546, 562, 594
Offset: 1

Views

Author

Amiram Eldar, Jul 14 2023

Keywords

Comments

The even-indexed Jacobsthal numbers A001045(2*n) = A002450(n) = (4^n-1)/3, for n >= 1, are terms since their representation is 2*n-1 1's.
A001045(2*n+1) - 1 = A020988(n) = (2/3)*(4^n-1) is a term for n >= 1, since its representation is 2*n 1's.
A001045(n) + 1 = A128209(n) is a term for n >= 0, since its representation for n = 0 is 1 and its representation for n >= 1 is n-1 0's between 2 1's.
A160156(n) is a term for n >= 0 since its representation is n 0's interleaved with n+1 1's.

Examples

			The first 10 terms are:
   n  a(n)  A280049(a(n))
  --  ----  -------------
   1     1              1
   2     2             11
   3     4            101
   4     5            111
   5     6           1001
   6    10           1111
   7    12          10001
   8    15          10101
   9    18          11011
  10    21          11111
		

Crossrefs

Programs

  • Mathematica
    Position[Select[Range[1000], EvenQ[IntegerExponent[#, 2]] &], _?(PalindromeQ[IntegerDigits[#, 2]] &)] // Flatten
  • PARI
    s(n) = if(n < 2, n > 0, n = s(n-1); until(valuation(n, 2)%2 == 0, n++); n); \\ A003159
    is(n) = {my(d = binary(s(n))); d == Vecrev(d);}

A350717 a(n) = 4*a(n-1) - n - 1, for n > 0, a(0) = 1.

Original entry on oeis.org

1, 2, 5, 16, 59, 230, 913, 3644, 14567, 58258, 233021, 932072, 3728275, 14913086, 59652329, 238609300, 954437183, 3817748714, 15270994837, 61083979328, 244335917291, 977343669142, 3909374676545, 15637498706156, 62549994824599, 250199979298370, 1000799917193453, 4003199668773784
Offset: 0

Views

Author

Paul Curtz, Feb 03 2022

Keywords

Comments

Last digit (using 0 to 9) is of period 10: repeat [1, 2, 5, 6, 9, 0, 3, 4, 7, 8].

Crossrefs

Cf. A007583 (first differences), A014825, A160156.

Programs

  • Mathematica
    LinearRecurrence[{6, -9, 4}, {1, 2, 5}, 28] (* Amiram Eldar, Feb 03 2022 *)
  • PARI
    a(n) = if (n, 4*a(n-1) - n - 1, 1); \\ Michel Marcus, Feb 03 2022
    
  • Python
    print([(2**(2*n+1) + 3*n + 7)//9 for n in range(30)])
    # Gennady Eremin, Feb 05 2022

Formula

a(n) = (2^(2*n+1) + 3*n + 7)/9.
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3), n >= 3.
a(n) = a(n-1) + A007583(n-1).
a(n) = 2*a(n-1) + A014825(n-1).
G.f.: (-2*x^2 + 4*x - 1)/((x - 1)^2*(4*x - 1)). - Thomas Scheuerle, Feb 03 2022
a(n) = -1 + 5*a(n-1) - 4*a(n-2), n >= 2.
a(n) = 1 + A160156(n-1), n >= 1.

Extensions

More terms from Michel Marcus, Feb 03 2022
Showing 1-3 of 3 results.