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

A154271 Dirichlet inverse of A154272; Fully multiplicative with a(3^e) = (-1)^e, a(p^e) = 0 for primes p <> 3.

Original entry on oeis.org

1, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
Offset: 1

Views

Author

Mats Granvik, Jan 06 2009

Keywords

Comments

Abs(A154272) is a Fredholm-Rueppel-like sequence.
Sequence equals +1 if n is an even power of 3 (3^0, 3^2, 3^4,...), equals -1 if n is an odd power of 3 (3^1, 3^3, 3^5, 3^7,...) and zero elsewhere. - Comment edited by R. J. Mathar, Jun 24 2013

Crossrefs

Cf. A154272, A154269, A014578 (Möbius inverse), A154282, A225569.
Cf. A225569 (gives the absolute values when interpreted as the characteristic function of powers of 3, i.e., with starting offset 1 instead of 0).

Programs

  • Mathematica
    nn = 95;a = PadRight[{1, 0, 1}, nn, 0];Inverse[Table[Table[If[Mod[n, k] == 0, a[[n/k]], 0], {k, 1, nn}], {n, 1, nn}]][[All, 1]] (* Mats Granvik, Jul 24 2017 *)
  • PARI
    A154271(n) = { my(k=valuation(n,3)); if((3^k)==n,(-1)^k,0); }; \\ Antti Karttunen, Jul 24 2017
    
  • Scheme
    (define (A154271 n) (cond ((= 1 n) 1) ((zero? (modulo n 3)) (* -1 (A154271 (/ n 3)))) (else 0))) ;; Antti Karttunen, Jul 24 2017

Formula

Fully multiplicative with a(3) = -1, a(p) = 0 for primes p <> 3. - Antti Karttunen, Jul 24 2017
From Amiram Eldar, Nov 03 2023: (Start)
abs(a(n)) = A225569(n-1).
Dirichlet g.f.: 1/(1+3^(-s)). (End)
a(n) = Sum_{d|n} A359377(d)*A008836(n/d). - Ridouane Oudra, Jul 15 2025

Extensions

Alternative description added to the name by Antti Karttunen, Jul 24 2017

A320530 T(n,k) = k^n + k^(n - 2)*n*(n - 1)*(k*(k - 1) + 1)/2 for 0 < k <= n and T(n,0) = A154272(n+1), square array read by antidiagonals upwards.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 2, 2, 1, 0, 4, 7, 3, 1, 0, 7, 26, 16, 4, 1, 0, 11, 88, 90, 29, 5, 1, 0, 16, 272, 459, 220, 46, 6, 1, 0, 22, 784, 2133, 1504, 440, 67, 7, 1, 0, 29, 2144, 9234, 9344, 3775, 774, 92, 8, 1, 0, 37, 5632, 37908, 54016, 29375, 7992, 1246, 121, 9
Offset: 0

Views

Author

Keywords

Comments

Construct a length n ternary word over the alphabet {a, b, c} as follows: letters from the set {a, b} are only used in pairs of at most one, and consist of either (a,b), (b,a) or (b,b). Next, replace each occurrence of a, b and c with a length k binary word such that 'a' has exactly two letters 1, 'b' contains no 0's and 'c' has exactly one letter 0 (empty words otherwise, respectively). Then T(n,k) gives the number of length n*k binary words resulting from this substitution. First column follows from the next definition.
In Kauffman's language, T(n,k) is the number of ways of splitting the crossings of the Pretzel knot shadow P(k, k, ..., k) having n tangles, of k half-twists respectively, such that the final diagram consists of two Jordan curves. This result can be achieved by assigning each tangle of the Pretzel knot a length k binary words in a way that letters 1 and 0 indicate the adequate choice for splitting the crossings.
Columns are linear recurrence sequences with signature (3*k, -3*k^2, k^3).

Examples

			Square array begins:
    1,  1,     1,     1,      1,       1,       1, ...
    0,  1,     2,     3,      4,       5,       6, ...
    1,  2,     7,    16,     29,      46,      67, ...
    0,  4,    26,    90,    220,     440,     774, ...
    0,  7,    88,   459,   1504,    3775,    7992, ...
    0, 11,   272,  2133,   9344,   29375,   74736, ...
    0, 16,   784,  9234,  54016,  212500,  649296, ...
    0, 22,  2144, 37908, 295936, 1456250, 5342112, ...
    ...
T(3,2) = 2^3 + 2^(3 - 2)*3*(3 - 1)*(2*(2 - 1) + 1)/2 = 26. The corresponding ternary words are abc, acb, cab, bac, bca, cba, bbc, bcb, cbb, ccc.  Next, let a = {00}, b = {11} and c = {01, 10}. The resulting binary words are
    abc: 001101, 001110;
    acb: 000111, 001011;
    cab: 010011, 100011;
    bac: 110001, 110010;
    bca: 110100, 111000;
    cba: 011100, 101100;
    bbc: 111101, 111110;
    bcb: 110111, 111011;
    cbb: 011111, 101111;
    ccc: 010101, 101010, 010110, 011001, 100101, 101001, 100110, 011010.
		

References

  • Louis H. Kauffman, Formal Knot Theory, Princeton University Press, 1983.

Crossrefs

Column 1 is column 2 of A300453.
Column 2 is column 2 of A300184.

Programs

  • Mathematica
    T[n_, k_] = If[k > 0, k^n + k^(n - 2)*n*(n - 1)*(k*(k - 1) + 1)/2, If[k == 0 && (n == 0 || n == 1), 1, 0]];
    Table[Table[T[n - k, k], {k, 0, n}], {n, 0, 10}]//Flatten
  • Maxima
    t(n, k) := k^n + k^(n - 2)*binomial(n, 2)*(2*binomial(k, 2) + 1)$
    u(n) := if n = 0 or n = 1 then 1 else 0$
    T(n, k) := if k = 0 then u(n) else t(n,k)$
    tabl(nn) := for n:0 thru 10 do print(makelist(T(n, k), k, 0, nn))$

Formula

T(n,k) = k^n + k^(n - 2)*binomial(n, 2)*(2*binomial(k, 2) + 1), k > 0.
T(n,k) = (3*k)*T(n-1,k) - (3*k^2)*T(n-2,k) + (k^3)*T(n-3,k), n > 3.
T(n,1) = A152947(n+1).
T(n,2) = A300451(n).
T(2,n) = A130883(n).
G.f. for columns: (1 - 2*k*x + (1 - k + 2*k^2)*x^2 )/(1 - k*x)^3.
E.g.f. for columns: ((1 - k + k^2)*x^2 + 2)*exp(k*x)/2.

A321125 T(n,k) = b(n+k) - (2*b(n)*b(k) + 1)*b(n*k) + b(n) + b(k) + 1, where b(n) = A154272(n+1), square array read by antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Let (A,B,d) denote the three-variable bracket polynomial for the two-bridge knot with Conway's notation C(n,k). Then T(n,k) is the leading coefficient of the reduced polynomial x*(1,1,x). In Kauffman's language, T(n,k) is the number of states of the two-bridge knot C(n,k) corresponding to the maximum number of Jordan curves.

Examples

			Square array begins:
  1, 1, 1, 1, 1, 1, ...
  1, 2, 1, 1, 1, 1, ...
  1, 1, 3, 2, 2, 2, ...
  1, 1, 2, 1, 1, 1, ...
  1, 1, 2, 1, 1, 1, ...
  1, 1, 2, 1, 1, 1, ...
  ...
		

References

  • Louis H. Kauffman, Formal Knot Theory, Princeton University Press, 1983.

Crossrefs

Programs

  • Mathematica
    b[n_] = If[n == 0 || n == 2, 1, 0];
    T[n_, k_] = b[n + k] - (2*b[n]*b[k] + 1)*b[n*k] + b[n] + b[k] + 1;
    Table[T[k, n - k], {n, 0, 12}, {k, 0, n}] // Flatten
  • Maxima
    b(n) := if n = 0 or n = 2 then 1 else 0$ /* A154272(n+1) */
    T(n, k) := b(n + k) - (2*b(n)*b(k) + 1)*b(n*k) + b(n) + b(k) + 1$
    create_list(T(k, n - k), n, 0, 12, k, 0, n);

Formula

T(n,0) = T(0,n) = 1, and T(n,k) = b(n+k) - b(n)*b(k) - b(n*k) + c(n)*c(k) for n >= 1, k >= 1, where b(n) = A154272(n+1) and c(n) = A294619(n).
T(n,1) = A300453(n+1,A321126(n,1)).
T(n,2) = A300454(n,A321126(n,2)).
T(n,n) = A321127(n,A004280(n+1)).
G.f.: (1 + (x - x^2)*y - (x - 3*x^2 + x^3)*y^2 - x^2*y^3)/((1 - x)*(1 - y)).
E.g.f.: ((x^2 + 2*exp(x))*exp(y) - x^2 + (2*x - x^2)*y - (1 + x - exp(x))*y^2)/2.

A291728 p-INVERT of (1,0,1,0,0,0,0,...), where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 2, 4, 9, 17, 35, 70, 142, 285, 576, 1160, 2340, 4716, 9510, 19171, 38653, 77926, 157110, 316747, 638599, 1287479, 2595698, 5233196, 10550681, 21271280, 42885152, 86460984, 174314476, 351436368, 708532813, 1428476905, 2879960190, 5806303628, 11706120825
Offset: 0

Views

Author

Clark Kimberling, Sep 08 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,0,1,0,0,0,0,...) = A154272, in some cases t(1,0,1,0,0,0,0,...) is a shifted (or differently indexed) version of the indicated sequence:
***
p(S) t(1,0,1,0,0,0,0,...)
1 - S A000930 (Narayana's cows sequence)
1 - S^2 A002478 (except for 0's)
1 - S^3 A291723
1 - S^5 A291724
(1 - S)^2 A291725
(1 - S)^3 A291726
(1 - S)^4 A291727
1 - S - S^2 A291728
1 - 2S - S^2 A291729
1 - 2S - 2S^2 A291730
(1 - 2S)^2 A291732
(1 - S)(1 - 2S) A291734
1 - S - S^3 A291735
1 - S^2 - S^3 A291736
1 - S - S^2 - S^3 A291737
1 - S - S^4 A291738
1 - S^3 - S^6 A291739
(1 - S)(1 - S^2) A291740
(1 - S)(1 + S^2) A291741

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + x^3; p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A154272 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291728 *)

Formula

G.f.: (-1 - x - x^2 - 2 x^3 - x^5)/(-1 + x + x^2 + x^3 + 2 x^4 + x^6).
a(n) = a(n-1) + a(n-2) + a(n-3) + 2*a(n-4) + a(n-6) for n >= 7.

A304182 Number of primitive inequivalent mirror-symmetric sublattices of rectangular lattice of index n.

Original entry on oeis.org

1, 3, 2, 4, 2, 6, 2, 4, 2, 6, 2, 8, 2, 6, 4, 4, 2, 6, 2, 8, 4, 6, 2, 8, 2, 6, 2, 8, 2, 12, 2, 4, 4, 6, 4, 8, 2, 6, 4, 8, 2, 12, 2, 8, 4, 6, 2, 8, 2, 6, 4, 8, 2, 6, 4, 8, 4, 6, 2, 16, 2, 6, 4, 4, 4, 12, 2, 8, 4, 12, 2, 8, 2, 6, 4, 8, 4, 12, 2, 8, 2, 6, 2, 16, 4
Offset: 1

Views

Author

Andrey Zabolotskiy, May 07 2018

Keywords

Examples

			There are 6 = A001615(4) lattices in Z^2 whose quotient group is C_4. The reflection through an axis relates <(4,0), (1,1)> and <(4,0), (3,1)>. The remaining 4 = a(4) lattices are fixed.
		

Crossrefs

Cf. A069735 (not only primitive sublattices), A304183 (primitive oblique sublattices), A069734 (all sublattices).
Cf. other columns of tables 4 and 5 from [Rutherford, 2009]: A001615, A060594, A157223, A000089, A157224, A000086, A157227, A019590, A157228, A157226, A157230, A157231, A154272, A157235.

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, If[e == 1, 3, 4], 2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 22 2022 *)

Formula

From Álvar Ibeas, Mar 18 2021: (Start)
For n odd, a(n) = A034444(n) = 2^(A001221(n)).
For n even, a(n) = A034444(n) + A034444(n/2). If 4|n, a(n) = 2^(A001221(n) + 1); otherwise, a(n) = 3 * 2^(A001221(n) - 1).
Multiplicative with a(2) = 3, a(2^e) = 4 (for e>1), and a(p^e) = 2 (for p>2).
Dirichlet g.f.: (1+2^(-s)) * zeta(s)^2 / zeta(2s).
(End)
Sum_{k=1..n} a(k) ~ (log(n) + 2*gamma - log(2)/3 - 2*zeta'(2)/zeta(2) - 1)*9*n/Pi^2, where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 31 2022

A132460 Irregular triangle read by rows of the initial floor(n/2) + 1 coefficients of 1/C(x)^n, where C(x) is the g.f. of the Catalan sequence (A000108).

Original entry on oeis.org

1, 1, 1, -2, 1, -3, 1, -4, 2, 1, -5, 5, 1, -6, 9, -2, 1, -7, 14, -7, 1, -8, 20, -16, 2, 1, -9, 27, -30, 9, 1, -10, 35, -50, 25, -2, 1, -11, 44, -77, 55, -11, 1, -12, 54, -112, 105, -36, 2, 1, -13, 65, -156, 182, -91, 13, 1, -14, 77, -210, 294, -196, 49, -2
Offset: 0

Views

Author

Paul D. Hanna, Aug 21 2007

Keywords

Comments

The length of row n is A008619(n).
Essentially equals a signed version of A034807, the triangle of Lucas polynomials. The initial n coefficients of 1/C(x)^n consist of row n followed by floor((n-1)/2) zeros for n > 0.
For the following formula for 1/C(x)^n see the W. Lang reference, proposition 1 on p. 411:
1/C(x)^n = (sqrt(x))^n*(S(n,1/sqrt(x)) - sqrt(x)*S(n-1,1/sqrt(x))*C(x)), n >= 0, with the Chebyshev polynomials S(n,x) with coefficients given in A049310. See also the coefficient array A115139 for P(n,x) = (sqrt(x)^(n-1))*S(n-1, 1/sqrt(x)). - Wolfdieter Lang, Sep 14 2013
This triangular array is composed of interleaved rows of reversed, A127677 (cf. A156308, A217476, A263916) and reversed, signed A111125. - Tom Copeland, Nov 07 2015
It seems that the n-th row lists the coefficients of the HOMFLYPT (HOMFLY) polynomial reduced to one variable for link family n, see Jablan's slide 38. - Andrey Zabolotskiy, Jan 16 2018
For n >= 1 row n gives the coefficients of the Girard-Waring formula for the sum of x1^n + x2^n in terms of the elementary symmetric functions e_1(x1,x2) = x1 + x2 and e_2(x1,x2) = x1*x2. This is an array using the partitions of n, in the reverse Abramowitz-Stegun order, with all partitions with parts larger than 2 eliminated. E.g., n = 4: x1^4 + x2^4 = 1*e1^4 - 4*e1^3*e2 + 2*e1*e2^2. See also A115131, row n = 4, with the mentioned partitions omitted. - Wolfdieter Lang, May 03 2019
Row n lists the coefficients of the n-th Faber polynomial for the replicable function given in A154272 with offset -1. - Ben Toomey, May 12 2020

Examples

			The irregular triangle T(n,k) begins:
n\k 0    1    2    3    4    5    6   7 ...
-------------------------------------------------
0:  1
1:  1
2:  1   -2
3:  1   -3
4:  1   -4    2
5:  1   -5    5
6:  1   -6    9   -2
7:  1   -7   14   -7
8:  1   -8   20  -16    2
9:  1   -9   27  -30    9
10: 1  -10   35  -50   25   -2
11: 1  -11   44  -77   55  -11
12: 1  -12   54 -112  105  -36    2
13: 1  -13   65 -156  182  -91   13
14: 1  -14   77 -210  294 -196   49  -2
... (reformatted - _Wolfdieter Lang_, May 03 2019)
		

Crossrefs

Cf. A000108, A008619, A034807 (Lucas polynomials), A111125, A115131 (Waring numbers), A127677, A132461 (row squared sums), A156308, A217476, A263916.

Programs

  • Mathematica
    T[0, 0] = 1; T[n_, k_] := (-1)^k (Binomial[n-k, k] + Binomial[n-k-1, k-1]);
    Table[T[n, k], {n, 0, 14}, {k, 0, n/2}] // Flatten (* Jean-François Alcover, Jun 04 2018 *)
  • PARI
    {T(n,k)=if(k>n\2,0,(-1)^k*(binomial(n-k, k)+binomial(n-k-1, k-1)))}

Formula

T(n,k) = (-1)^k*( C(n-k,k) + C(n-k-1,k-1) ) for n >= 0, 0 <= k <= floor(n/2).
T(0,0) = 1; T(n,k) = (-1)^k*n*binomial(n-k,k)/(n-k), k = 0..floor(n/2). - Wolfdieter Lang, May 03 2019

A003050 Number of primitive sublattices of index n in hexagonal lattice: triples x,y,z from Z/nZ with x+y+z = 0, discarding any triple that can be obtained from another by multiplying by a unit and permuting.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 3, 4, 3, 4, 3, 6, 4, 5, 6, 6, 4, 7, 5, 8, 8, 7, 5, 12, 6, 8, 7, 10, 6, 14, 7, 10, 10, 10, 10, 14, 8, 11, 12, 16, 8, 18, 9, 14, 14, 13, 9, 20, 11, 16, 14, 16, 10, 19, 14, 20, 16, 16, 11, 28, 12, 17, 18, 18, 16, 26, 13, 20, 18, 26, 13, 28
Offset: 1

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
Also the number of triangles with vertices on points of the hexagonal lattice that have area equal to n/2. - Amihay Hanany, Oct 15 2009 [Here the area is measured in the units of the lattice unit cell area; since the number of the triangles of different shapes with the same half-integral area is infinite, the triangles are probably counted up to the equivalence relation defined in the Davey, Hanany and Rak-Kyeong Seong paper. Also, this comment probably belongs to A003051, not here. - Andrey Zabolotskiy, Mar 10 2018 and Jul 04 2019]
Also number of 2n-vertex connected cubic vertex-transitive graphs which are Cayley graphs for a dihedral group [Potočnik et al.]. - N. J. A. Sloane, Apr 19 2014

Examples

			For n = 6 the 3 primitive triples are 510, 411, 321.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003051 (not only primitive sublattices), A001615, A006984, A007997, A048259, A054345, A154272, A157235.

Programs

  • Mathematica
    Join[{1}, Table[p=Transpose[FactorInteger[n]][[1]]; If[Mod[n,2]==0 || Mod[n,9]==0, c1=0, c1=Product[(1+JacobiSymbol[p[[i]],3]), {i,Length[p]}]]; c2={2,1,0,1,1,1,0,1}[[1+Mod[n,8]]]; n*Product[(1+1/p[[i]]), {i, Length[p]}]/6+c1/3+2^(Length[p]-2+c2), {n,2,100}]] (* T. D. Noe, Oct 18 2009 *)

Formula

Let n = Product_{i=1..w} p_i^e_i. Then a(n) = (1/6)*n*Product_{i=1..w} (1 + 1/p_i) + (C_1)/3 + 2^(w-2+C_2),
where C_1 = 0 if 2|n or 9|n, = Product_{i=1..w, p_i > 3} (1 + Legendre(p_i, 3)) otherwise,
and C_2 = 2 if n == 0 (mod 8), 1 if n == 1, 3, 4, 5, 7 (mod 8), 0 if n == 2, 6 (mod 8).

A100063 A Chebyshev transform of Jacobsthal numbers.

Original entry on oeis.org

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

Views

Author

Paul Barry, Nov 02 2004

Keywords

Comments

A Chebyshev transform of A001045(n+1): if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))*A(x/(1+x^2)).
Also decimal expansion of 1111/9990. - Elmo R. Oliveira, Feb 18 2024
Also partial quotients of the continued fraction expansion of sqrt(5/2). - Hugo Pfoertner, Jan 10 2025

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + x^4 + x^5 + 2*x^6 + x^7 + x^8 + 2*x^9 + ... - _Michael Somos_, Feb 20 2024
		

Crossrefs

Programs

  • Mathematica
    PadRight[{1},120,{2,1,1}] (* or *) LinearRecurrence[{0,0,1},{1,1,1,2},120] (* Harvey P. Dale, Jul 08 2015 *)
    a[ n_] := If[n<1, Boole[n==0], {2, 1, 1}[[1+Mod[n, 3]]]]; (* Michael Somos, Feb 20 2024 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+x)(1+x^2)/(1-x^3)) \\ G. C. Greubel, May 03 2017
    
  • PARI
    {a(n) = if(n<1, n==0, [2, 1, 1][n%3+1])}; /* Michael Somos, Feb 20 2024 */
    
  • PARI
    contfrac(sqrt(5/2),,80) \\ Hugo Pfoertner, Jan 10 2025

Formula

G.f.: (1+x)(1+x^2)/(1-x^3).
a(n) = n*Sum_{k=0..floor(n/2)} binomial(n-k, k)(-1)^k*A001045(n-2k+1)/(n-k).
Multiplicative with a(3^e) = 2, a(p^e) = 1 otherwise. - David W. Wilson, Jun 11 2005
Dirichlet g.f.: zeta(s)*(1+1/3^s). Dirichlet convolution of A154272 and A000012. - R. J. Mathar, Feb 07 2011
a(n) = 2 if n == 0 (mod 3) and n > 0, and a(n) = 1 otherwise. - Amiram Eldar, Nov 01 2022
a(n) = gcd(Fibonacci(n), Lucas(n)) = gcd(A000045(n), A000032(n)), for n >= 1. - Amiram Eldar, Jul 10 2023

A145377 a(n) = A002324(n) mod 2.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Mar 12 2009

Keywords

Crossrefs

Essentially same as A195198.

Programs

Formula

a(n) = A195198(n) for n >= 1.
a(n) = Sum_{ m: m^2|n } A154272(n/m^2). - Andrey Zabolotskiy, May 07 2018

Extensions

More terms from Antti Karttunen, Nov 05 2017

A154282 Dirichlet inverse of A154281.

Original entry on oeis.org

1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Mats Granvik, Jan 06 2009

Keywords

Comments

Sequence is positive as often as negative.
Multiplicative because A154281 is. - Andrew Howroyd, Aug 05 2018

Crossrefs

Programs

  • Mathematica
    nn = 95; a = PadRight[{1, 0, 0, 1}, nn, 0]; Inverse[Table[Table[If[Mod[n, k] == 0, a[[n/k]], 0], {k, 1, nn}], {n, 1, nn}]][[All, 1]] (* Mats Granvik, Jul 23 2017 *)
  • PARI
    a(n) = {my(e=valuation(n,2)); if(e%2 == 0 && n == 1<Andrew Howroyd, Aug 05 2018

Formula

Multiplicative with a(2^e) = (-1)^(e/2) if e is even and 0 is e is odd, and a(p^e) = 0 if p is an odd prime. - Amiram Eldar, Aug 27 2023
Showing 1-10 of 31 results. Next