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.

Previous Showing 91-100 of 242 results. Next

A176971 Expansion of (1+x)/(1+x-x^3) in powers of x.

Original entry on oeis.org

1, 0, 0, 1, -1, 1, 0, -1, 2, -2, 1, 1, -3, 4, -3, 0, 4, -7, 7, -3, -4, 11, -14, 10, 1, -15, 25, -24, 9, 16, -40, 49, -33, -7, 56, -89, 82, -26, -63, 145, -171, 108, 37, -208, 316, -279, 71, 245, -524, 595
Offset: 0

Views

Author

Roger L. Bagula, Apr 29 2010

Keywords

Comments

Except for signs the sequence is the essentially same as A078013, A050935 and A104769.
Padovan sequence extended to negative indices. - Hugo Pfoertner, Jul 16 2017

Examples

			G.f. = 1 + x^3 - x^4 + x^5 - x^7 + 2*x^8 - 2*x^9 + x^10 + x^11 - 3*x^12 + ...
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x)/(1+x-x^3))); // G. C. Greubel, Sep 25 2018
  • Mathematica
    a[0] := 1; a[1] = 0; a[2] = 0;
    a[n_] := a[n] = a[n - 2] + a[n - 3];
    b = Table[a[n], {n, 0, 50}];
    Table[b[[n]]^2 - b[[n - 1]]*b[[n + 1]], {n, 1, Length[b] - 1}]
    a[ n_] := If[ n >= 0, SeriesCoefficient[ (1 + x) / (1 + x - x^3), {x, 0, n}], SeriesCoefficient[ 1 / (1 - x^2 - x^3), {x, 0, Abs@n}]]; (* Michael Somos, Dec 13 2013 *)
  • PARI
    {a(n) = if( n>=0, polcoeff( (1 + x) / (1 + x - x^3) + x * O(x^n), n), polcoeff( 1 / (1 - x^2 - x^3) + x * O(x^-n), -n))}; /* Michael Somos, Dec 13 2013 */
    

Formula

a(n) = A000931(n)^2 -A000931(n-1)*A000931(n+1).
a(n) = -a(n-1) +a(n-3). - R. J. Mathar, Apr 30 2010
a(n) = -A104769(n) - A104769(n+1). - Ralf Stephan, Aug 18 2013
G.f.: 1 / (1 - x^3 / (1 + x)). - Michael Somos, Dec 13 2013
a(n) = A182097(-n) for all n in Z. - Michael Somos, Dec 13 2013
A000931(n) = a(n)^2 - a(n-1) * a(n+1). - Michael Somos, Dec 13 2013
Binomial transform is A005251(n+1). - Michael Somos, Dec 13 2013

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A337548 Number of compositions (ordered partitions) of n into distinct parts congruent to 2 mod 3.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 1, 0, 2, 1, 0, 4, 1, 6, 4, 1, 6, 6, 1, 12, 6, 1, 18, 8, 25, 24, 8, 25, 30, 10, 49, 42, 10, 73, 48, 12, 121, 60, 132, 145, 72, 134, 217, 84, 254, 265, 96, 376, 361, 114, 616, 433, 126, 858, 553, 864, 1218, 649, 882, 1580, 817, 1620, 2180, 937
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 22 2020

Keywords

Examples

			a(15) = 6 because we have [8, 5, 2], [8, 2, 5], [5, 8, 2], [5, 2, 8], [2, 8, 5] and [2, 5, 8].
		

Crossrefs

Programs

  • Mathematica
    nmax = 65; CoefficientList[Series[Sum[k! x^(k (3 k + 1)/2)/Product[1 - x^(3 j), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} k! * x^(k*(3*k + 1)/2) / Product_{j=1..k} (1 - x^(3*j)).

A033217 Primes of form x^2 + 23*y^2.

Original entry on oeis.org

23, 59, 101, 167, 173, 211, 223, 271, 307, 317, 347, 449, 463, 593, 599, 607, 691, 719, 809, 821, 829, 853, 877, 883, 991, 997, 1097, 1117, 1151, 1163, 1181, 1231, 1319, 1451, 1453, 1481, 1553, 1613, 1669, 1697, 1787, 1789, 1867, 1871, 1879, 1889, 1913, 2027, 2053, 2143, 2309, 2339, 2347, 2381, 2393, 2423, 2539, 2647, 2677, 2693, 2707, 2741, 2819
Offset: 1

Views

Author

Keywords

Comments

Discriminant -23.
Also primes of the form x^2 + x*y + 6*y^2. - N. J. A. Sloane, Jun 02 2014
Also primes of the form x^2 - x*y + 6*y^2 with x and y nonnegative. - T. D. Noe, May 07 2005
Primes p such that X^3-X+1 is split modulo p. E.g., X^3-X+1 = (X-33)*(X-40)*(X-94) modulo 167. - Julien Freslon (julien.freslon(AT)wanadoo.fr), Feb 24 2007
It appears that, if x > 0, then tau(p) = A000594(p) == 2 (mod 23). - Comment from Jud McCranie
In fact, this sequence appears to be the same as primes p such that RamanujanTau(p) == {1,2} (mod 23). - Ray Chandler, Dec 01 2016
Excluding the first term, this sequence is the intersection of A191021 and A256567. - Arkadiusz Wesolowski, Oct 03 2021
From Amiram Eldar, Jan 10 2025: (Start)
a(2)..a(10000) are the first terms of the sequence of primes p such that tau(p) == 2 (mod 23), where tau is Ramanujan's tau function (A000594).
Moree and Noubissie (2024) proved that the following 3 conditions for a prime p are equivalent:
1. tau(p) == 2 (mod 23).
2. p divides A000931(p+3) where A000931 is the Padovan sequence.
3. The number of distinct roots modulo p of the polynomial x^3 - x - 1 is 3. (End)

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992. See pp. 158-160, "Integer 23 - the Tau function".

Crossrefs

Cf. A000594, A191021, A256567. Primes in A028958.

Programs

  • Mathematica
    QuadPrimes2[1, 0, 23, 10000] (* see A106856 *)
    Join[{23}, nn=23; pMax=5000; Union[Reap[Do[p=x^2 + nn y^2; If[p<=pMax&&PrimeQ[p], Sow[p]], {x, Sqrt[pMax]}, {y, Sqrt[pMax/nn]}]][[2, 1]]]] (* Vincenzo Librandi, Sep 05 2016 *)
  • PARI
    isok(p) = isprime(p) && !(kronecker(-23, p)==-1) && !polisirreducible(Mod(1, p)*(x^3-x-1)); \\ Arkadiusz Wesolowski, Oct 03 2021
    
  • PARI
    isok(p) = p==23 || (isprime(p) && #polrootsmod(x^3-x-1, p)==3); \\ Arkadiusz Wesolowski, Oct 09 2021

A077954 Expansion of 1/(1-x+2*x^2-x^3) in powers of x.

Original entry on oeis.org

1, 1, -1, -2, 1, 4, 0, -7, -3, 11, 10, -15, -24, 16, 49, -7, -89, -26, 145, 108, -208, -279, 245, 595, -174, -1119, -176, 1888, 1121, -2831, -3185, 3598, 7137, -3244, -13920, -295, 24301, 10971, -37926, -35567, 51256, 84464, -53615, -171287, 20407, 309366, 97265, -501060, -386224, 713161
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Examples

			G.f. = 1 + x - x^2 - 2*x^3 + x^4 + 4*x^5 - 7*x^7 - 3*x^8 + 11*x^9 + ...
		

Crossrefs

Programs

  • GAP
    a:=[1,1,-1];; for n in [4..50] do a[n]:=a[n-1]-2*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Aug 07 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x+2*x^2-x^3) )); // G. C. Greubel, Aug 07 2019
    
  • Maple
    seq(coeff(series(1/(1-x+2*x^2-x^3), x, n+1), x, n), n = 0..50); # G. C. Greubel, Aug 07 2019
  • Mathematica
    a[ n_] := If[ n < 0, SeriesCoefficient[ x^3 / (1 - 2 x + x^2 - x^3), {x, 0, -n}], SeriesCoefficient[ 1 / (1 - x + 2 x^2 - x^3), {x, 0, n}]]
    LinearRecurrence[{1,-2,1}, {1,1,-1}, 50] (* G. C. Greubel, Aug 07 2019 *)
  • PARI
    {a(n) = if( n<0,  polcoeff( x^3 / (1 - 2*x + x^2 - x^3) + x * O(x^-n), -n), polcoeff( 1 / (1 - x + 2*x^2 - x^3) + x * O(x^n), n))} /* Michael Somos, Sep 18 2012 */
    
  • Sage
    (1/(1-x+2*x^2-x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Aug 07 2019
    

Formula

a(0)=1, a(1)=1, a(2)=-1, a(n) = a(n-1) -2*a(n-2) +a(n-3) for n>=3. - Philippe Deléham, Sep 15 2006
a(n) = A000931(-2*n). - Michael Somos, Sep 18 2012
a(n) = A005314(-n-2). - Michael Somos, Dec 13 2013
a(n) = a(n-1) - 2*a(n-2) + a(n-3) for all n in Z. - Michael Somos, Dec 13 2013

A100891 Prime Padovan numbers.

Original entry on oeis.org

2, 3, 5, 7, 37, 151, 3329, 23833, 13091204281, 3093215881333057, 1363005552434666078217421284621279933627102780881053358473, 1558877695141608507751098941899265975115403618621811951868598809164180630185566719
Offset: 1

Views

Author

John Lien, Jan 10 2005

Keywords

Comments

Next term corresponds to Padovan(1262) and has 154 decimal digits.

References

  • Midhat J. Gazale, "Gnomon: From Pharaohs to Fractals", Princeton University Press, 1999.

Crossrefs

Indices of prime Padovan numbers are A112882.

Programs

  • Mathematica
    Rest[Select[LinearRecurrence[{0,1,1},{1,1,2},1000],PrimeQ]] (* Harvey P. Dale, Mar 31 2012 *)

Extensions

More terms from Robert G. Wilson v, Jan 14 2005

A127682 Number of non-isomorphic (i.e., defined up to a rotation and a reflection) maximal independent sets of the n-cycle graph having at least one symmetry axis. Also: Number of cyclic and palindromic compositions of n in which each term is either 2 or 3.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 2, 4, 3, 5, 4, 7, 5, 9, 7, 12, 9, 16, 12, 21, 16, 28, 21, 37, 28, 49, 37, 65, 49, 86, 65, 114, 86, 151, 114, 200, 151, 265, 200, 351, 265, 465, 351, 616, 465, 816, 616, 1081, 816, 1432, 1081, 1897, 1432, 2513, 1897, 3329, 2513, 4410, 3329
Offset: 1

Views

Author

Jean-Luc Marichal (jean-luc.marichal(AT)uni.lu), Jan 24 2007

Keywords

Crossrefs

Cf. A000931.

Programs

  • Mathematica
    Rest[CoefficientList[Series[-x^2*(x^4+x^3+x^2+x+1)/(x^6+x^4-1),{x,0,63}],x]] (* Vaclav Kotesovec, Mar 29 2014 *)
    LinearRecurrence[{0,0,0,1,0,1},{0,1,1,1,1,2},70] (* Harvey P. Dale, Jul 17 2014 *)
  • PARI
    concat(0, Vec(-x^2*(x^4+x^3+x^2+x+1)/(x^6+x^4-1) + O(x^100))) \\ Colin Barker, Mar 29 2014

Formula

a(n) = A000931(k+3) if n=2k-1 and a(n) = A000931(k+5) if n=2k.
a(n) = a(n-4) + a(n-6).
G.f.: -x^2*(x^4+x^3+x^2+x+1) / (x^6+x^4-1). - Colin Barker, Mar 29 2014

A183368 T(n,k)=Number of nXk binary arrays with no element equal to the sum mod 3 of its horizontal and vertical neighbors.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 3, 5, 5, 3, 4, 12, 18, 12, 4, 5, 21, 39, 39, 21, 5, 7, 41, 108, 138, 108, 41, 7, 9, 84, 288, 548, 548, 288, 84, 9, 12, 171, 795, 2129, 3102, 2129, 795, 171, 12, 16, 355, 2278, 8311, 17101, 17101, 8311, 2278, 355, 16, 21, 732, 6438, 32933, 95674, 137688
Offset: 1

Views

Author

R. H. Hardin Jan 04 2011

Keywords

Comments

Table starts
..1...2.....2......3........4.........5...........7............9.............12
..2...3.....5.....12.......21........41..........84..........171............355
..2...5....18.....39......108.......288.........795.........2278...........6438
..3..12....39....138......548......2129........8311........32933.........130750
..4..21...108....548.....3102.....17101.......95674.......543837........3094889
..5..41...288...2129....17101....137688.....1107441......8969225.......72989578
..7..84...795...8311....95674...1107441....12617557....145766281.....1687526938
..9.171..2278..32933...543837...8969225...145766281...2402945556....39693410307
.12.355..6438.130750..3094889..72989578..1687526938..39693410307...936460285557
.16.732.18394.519980.17654882.594531764.19534278264.655471213213.22047188457210

Examples

			Some solutions for 6X5
..0..1..0..0..1....1..1..1..0..1....0..0..1..1..1....1..1..1..1..1
..0..0..0..0..0....1..0..1..0..0....1..0..1..0..1....1..0..1..0..1
..1..1..1..1..1....1..1..1..0..1....0..0..1..1..1....1..1..1..1..1
..1..1..0..1..1....1..1..1..0..0....0..1..1..0..1....0..0..0..0..0
..0..0..1..0..0....1..0..1..1..0....1..1..0..1..1....1..1..1..0..0
..1..0..0..0..1....1..1..1..1..0....1..1..1..1..0....1..1..1..0..1
		

Crossrefs

Column 1 is A000931(n+6)

A183380 T(n,k)=Number of nXk binary arrays with no element equal to the mod 3 sum of its king-move neighbors.

Original entry on oeis.org

1, 2, 2, 2, 5, 2, 3, 9, 9, 3, 4, 20, 28, 20, 4, 5, 37, 68, 68, 37, 5, 7, 61, 143, 225, 143, 61, 7, 9, 144, 364, 627, 627, 364, 144, 9, 12, 289, 952, 2152, 2767, 2152, 952, 289, 12, 16, 497, 2509, 7036, 11345, 11345, 7036, 2509, 497, 16, 21, 1100, 6412, 22392, 51706, 64530
Offset: 1

Views

Author

R. H. Hardin Jan 04 2011

Keywords

Comments

Table starts
..1....2.....2......3.......4........5..........7...........9...........12
..2....5.....9.....20......37.......61........144.........289..........497
..2....9....28.....68.....143......364........952........2509.........6412
..3...20....68....225.....627.....2152.......7036.......22392........74381
..4...37...143....627....2767....11345......51706......223151.......974387
..5...61...364...2152...11345....64530.....377217.....2204567.....12979097
..7..144...952...7036...51706...377217....2952294....22811993....176950342
..9..289..2509..22392..223151..2204567...22811993...238729120...2477358069
.12..497..6412..74381..974387.12979097..176950342..2477358069..34520238211
.16.1100.16544.241819.4317835.75859054.1369406125.25692566781.477784675604

Examples

			Some solutions for 6X5
..0..0..0..0..0....0..0..0..0..0....0..0..0..0..0....1..0..1..0..1
..1..1..0..1..0....1..1..0..0..1....0..1..0..1..0....1..1..1..1..1
..0..1..1..1..0....1..1..0..0..0....0..1..1..1..0....1..0..1..1..0
..0..1..1..0..0....0..0..0..0..0....0..0..1..0..0....0..0..0..1..1
..1..1..1..0..0....1..1..1..1..0....1..0..0..0..1....1..0..1..0..1
..0..0..1..1..0....1..1..1..1..0....1..1..1..1..1....0..0..0..1..0
		

Crossrefs

Column 1 is A000931(n+6)

A247917 Expansion of 1 / (1 + x - x^3) in powers of x.

Original entry on oeis.org

1, -1, 1, 0, -1, 2, -2, 1, 1, -3, 4, -3, 0, 4, -7, 7, -3, -4, 11, -14, 10, 1, -15, 25, -24, 9, 16, -40, 49, -33, -7, 56, -89, 82, -26, -63, 145, -171, 108, 37, -208, 316, -279, 71, 245, -524, 595, -350, -174, 769, -1119, 945, -176, -943, 1888, -2064, 1121
Offset: 0

Views

Author

Michael Somos, Sep 26 2014

Keywords

Examples

			G.f. = 1 - x + x^2 - x^4 + 2*x^5 - 2*x^6 + x^7 + x^8 - 3*x^9 + 4*x^10 + ...
		

Crossrefs

Programs

  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1 + x - x^3)));  // G. C. Greubel, Aug 04 2018
  • Mathematica
    CoefficientList[Series[1/(1 + x - x^3), {x, 0, 100}], x] (* Vincenzo Librandi, Sep 27 2014 *)
    LinearRecurrence[{-1,0,1},{1,-1,1},60] (* Harvey P. Dale, Apr 10 2025 *)
  • PARI
    {a(n) = if( n<0, n = -3-n; polcoeff( 1 / (1 - x^2 - x^3) + x * O(x^n), n), polcoeff( 1 / (1 + x - x^3) + x * O(x^n), n))};
    

Formula

G.f.: 1 / (1 + x - x^3).
0 = a(n) - a(n+2) - a(n+3) for all n in Z.
a(-n) = A000931(n) for all n in Z.
a(n) = A176971(n+3) for all n in Z.
-a(n) = A104769(n+1) for all n in Z.
(-1)^n * a(n) = A050935(n+3) for all n in Z.
-(-1)^n * a(n) = A078013(n+3) for all n in Z.

A269175 a(n) = number of distinct k for which A269174(k) = n; number of finite predecessors for pattern encoded in the binary expansion of n in Wolfram's Rule 124 cellular automaton.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 22 2016

Keywords

Comments

At positions A000225 seems to occur the record values of this sequence: 1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, 465, ... which seem to match with A000931 (Padovan sequence), or more exactly, with A182097 (Number of compositions (ordered partitions) into parts 2 and 3). Note that these values give also the number of predecessors for each "repunit-pattern" (2^n)-1 in Rule 110 cellular automaton, as rules 110 and 124 are mirror images of each other.

Crossrefs

Cf. A269176 (indices of zeros), A269177 (of nonzeros), A269178 (of ones).

Programs

  • Scheme
    (definec (A269175 n) (let loop ((p 0) (s 0)) (cond ((> p n) s) (else (loop (+ 1 p) (+ s (if (= n (A269174 p)) 1 0))))))) ;; Very straightforward and very slow.
    ;; Somewhat optimized version:
    (definec (A269175 n) (if (zero? n) 1 (let ((nwid-1 (- (A000523 n) 1))) (let loop ((p (if (< n 2) 0 (A000079 nwid-1))) (s 0)) (cond ((> (A000523 p) nwid-1) s) (else (loop (+ 1 p) (+ s (if (= n (A269174 p)) 1 0)))))))))
Previous Showing 91-100 of 242 results. Next