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 61-70 of 103 results. Next

A053661 For n > 1: if n is present, 2n is not.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 17, 19, 20, 21, 23, 25, 27, 28, 29, 31, 32, 33, 35, 36, 37, 39, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 57, 59, 60, 61, 63, 65, 67, 68, 69, 71, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 89, 91, 92, 93, 95, 97, 99, 100, 101, 103, 105
Offset: 1

Views

Author

Jeevan Chana Rai (Karanjit.Rai(AT)btinternet.com), Feb 16 2000

Keywords

Comments

The Name line gives a property of the sequence, not a definition. The sequence can be defined simultaneously with b(n) := A171945(n) via a(n) = mex{a(i), b(i) : 0 <= i < n} (n >= 0}, b(n)=2a(n). The two sequences are complementary, hence A053661 is identical to A171944 (except for the first terms). Furthmore, A053661 is the same as A003159 except for the replacement of vile by dopey powers of 2. - Aviezri S. Fraenkel, Apr 28 2011
For n >= 2, either n = 2^k where k is odd or n = 2^k*m where m > 1 is odd and k is even (found by Kirk Bresniker and Stan Wagon). [Robert Israel, Oct 10 2010]
Subsequence of A175880; A000040, A001749, A002001, A002042, A002063, A002089, A003947, A004171 and A081294 are subsequences.

Crossrefs

Essentially identical to A171944 and the complement of A171945.

Programs

  • Haskell
    a053661 n = a053661_list !! (n-1)
    a053661_list = filter (> 0) a175880_list -- Reinhard Zumkeller, Feb 09 2011
  • Maple
    N:= 1000: # to get all terms <= N
    sort([1,seq(2^(2*i+1),i=0..(ilog2(N)-1)/2), seq(seq(2^(2*i)*(2*j+1),j=1..(N/2^(2*i)-1)/2),i=0..ilog2(N)/2)]); # Robert Israel, Jul 24 2015
  • Mathematica
    Clear[T]; nn = 105; T[n_, k_] := T[n, k] = If[n < 1 || k < 1, 0, If[n == 1 || k == 1, 1, If[k > n, T[k, n], If[n > k, T[k, Mod[n, k, 1]], -Product[T[n, i], {i, n - 1}]]]]]; DeleteCases[Table[If[T[n, n] == -1, n, ""], {n, 1, nn}], ""] (* Mats Granvik, Aug 25 2012 *)

Extensions

More terms from James Sellers, Feb 22 2000

A099142 a(n) = 6^n * T(n, 4/3) where T is the Chebyshev polynomial of the first kind.

Original entry on oeis.org

1, 8, 92, 1184, 15632, 207488, 2757056, 36643328, 487039232, 6473467904, 86042074112, 1143628341248, 15200538791936, 202038000386048, 2685388609667072, 35692849740775424, 474411605904392192
Offset: 0

Views

Author

Paul Barry, Sep 30 2004

Keywords

Comments

In general, r^n * T(n,(r+2)/r) has g.f. (1-(r+2)*x)/(1-2*(r+2)*x + r^2*x^2), e.g.f. exp((r+2)*x)*cosh(2*sqrt(r+1)*x), a(n) = Sum_{k=0..n} (r+1)^k*binomial(2n,2k) and a(n) = (1+sqrt(r+1))^(2*n)/2 + (1-sqrt(r+1))^(2*n)/2.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{16,-36},{1,8},20] (* Harvey P. Dale, Mar 09 2018 *)
  • PARI
    a(n) = 6^n*polchebyshev(n, 1, 4/3); \\ Michel Marcus, Sep 08 2019

Formula

G.f.: (1-8*x)/(1-16*x+36*x^2);
E.g.f.: exp(8*x)*cosh(2*sqrt(7)*x).
a(n) = 6^n * T(n, 8/6) where T is the Chebyshev polynomial of the first kind.
a(n) = Sum_{k=0..n} 7^k * binomial(2n, 2k).
a(n) = (1+sqrt(7))^(2*n)/2 + (1-sqrt(7))^(2*n)/2.
a(0)=1, a(1)=8, a(n) = 16*a(n-1) - 36*a(n-2) for n > 1. - Philippe Deléham, Sep 08 2009

A304411 If n = Product (p_j^k_j) then a(n) = Product ((p_j + 1)*k_j).

Original entry on oeis.org

1, 3, 4, 6, 6, 12, 8, 9, 8, 18, 12, 24, 14, 24, 24, 12, 18, 24, 20, 36, 32, 36, 24, 36, 12, 42, 12, 48, 30, 72, 32, 15, 48, 54, 48, 48, 38, 60, 56, 54, 42, 96, 44, 72, 48, 72, 48, 48, 16, 36, 72, 84, 54, 36, 72, 72, 80, 90, 60, 144, 62, 96, 64, 18, 84, 144, 68, 108, 96, 144, 72, 72
Offset: 1

Views

Author

Ilya Gutkovskiy, May 12 2018

Keywords

Examples

			a(24) = a(2^3*3) = (2 + 1)*3 * (3 + 1)*1 = 36.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ ((#[[1]] + 1) #[[2]] & /@ FactorInteger[n]); a[1] = 1; Table[a[n], {n, 72}]
    Table[Total[Select[Divisors[n], SquareFreeQ]] DivisorSigma[0, n/Last[Select[Divisors[n], SquareFreeQ]]], {n, 72}]
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); (p+1)*e)} \\ Andrew Howroyd, Jul 24 2018

Formula

a(n) = A005361(n)*A048250(n) = A000005(n/A007947(n))*A000203(A007947(n)).
a(p^k) = (p + 1)*k where p is a prime and k > 0.
a(n) = Product_{p|n} (p + 1) if n is a squarefree (A005117).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/12) * Product_{p prime} (1 - 1/p^2 + 1/p^3) = A072691 * A330596 = 0.6156455744... . - Amiram Eldar, Nov 30 2022

A333988 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of (1-(k+1)*x) / (1-2*(k+1)*x+((k-1)*x)^2).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 8, 1, 1, 4, 17, 32, 1, 1, 5, 28, 99, 128, 1, 1, 6, 41, 208, 577, 512, 1, 1, 7, 56, 365, 1552, 3363, 2048, 1, 1, 8, 73, 576, 3281, 11584, 19601, 8192, 1, 1, 9, 92, 847, 6016, 29525, 86464, 114243, 32768, 1, 1, 10, 113, 1184, 10033, 62976, 265721, 645376, 665857, 131072, 1
Offset: 0

Views

Author

Seiichi Manyama, Sep 04 2020

Keywords

Examples

			Square array begins:
  1,   1,    1,     1,     1,     1, ...
  1,   2,    3,     4,     5,     6, ...
  1,   8,   17,    28,    41,    56, ...
  1,  32,   99,   208,   365,   576, ...
  1, 128,  577,  1552,  3281,  6016, ...
  1, 512, 3363, 11584, 29525, 62976, ...
		

Crossrefs

Main diagonal gives A333990.

Programs

  • Mathematica
    T[n_, 0] := 1; T[n_, k_] := Sum[k^j * Binomial[2*n, 2*j], {j, 0, n}]; Table[T[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Sep 04 2020 *)
  • PARI
    {T(n, k) = sum(j=0, n, k^j*binomial(2*n, 2*j))}

Formula

T(n,k) = Sum_{j=0..n} k^j * binomial(2*n,2*j).
T(0,k) = 1, T(1,k) = k+1 and T(n,k) = 2 * (k+1) * T(n-1,k) - (k-1)^2 * T(n-2,k) for n>1.

A115716 A divide-and-conquer sequence.

Original entry on oeis.org

1, 1, 3, 1, 3, 1, 11, 1, 3, 1, 11, 1, 3, 1, 43, 1, 3, 1, 11, 1, 3, 1, 43, 1, 3, 1, 11, 1, 3, 1, 171, 1, 3, 1, 11, 1, 3, 1, 43, 1, 3, 1, 11, 1, 3, 1, 171, 1, 3, 1, 11, 1, 3, 1, 43, 1, 3, 1, 11, 1, 3, 1, 683, 1, 3, 1, 11, 1, 3, 1, 43, 1, 3, 1, 11, 1, 3, 1, 171, 1, 3, 1, 11, 1, 3, 1, 43, 1, 3, 1, 11, 1
Offset: 0

Views

Author

Paul Barry, Jan 29 2006

Keywords

Examples

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

Crossrefs

Partial sums are A032925.
Row sums of number triangle A115717.
Bisection: A276390.
See A276391 for a closely related sequence.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          `if`(n::odd, 1, 4*a(n/2-1)-1))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Sep 07 2016
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, If[OddQ[n], 1, 4*a[n/2-1]-1]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 25 2017, after Alois P. Heinz *)
  • PARI
    {a(n) = if( n<1, n==0, n%2, 1, 4 * a(n/2-1) - 1)}; /* Michael Somos, Sep 07 2016 */

Formula

The g.f. G(x) satisfies G(x)-4*x^2*G(x^2)=(1+2*x)/(1+x). - Argument and offset corrected by Bill Gosper, Sep 07 2016
G.f.: 1/(1-x) + Sum_{k>=0} ((4^k-0^k)/2) *x^(2^(k+1)-2) /(1-x^(2^k)). - corrected by R. J. Mathar, Sep 07 2016
a(n)=A007583(A091090(n+1)-1). - Adapted to new offset by R. J. Mathar, Sep 07 2016
a(0) = 1, a(2*n + 1) = 1 for n>=0. a(2*n + 2) = 4*a(n) - 1 for n>=0. - Michael Somos, Sep 07 2016

A134683 Expansion of 1+x*(2+3*x)/(1-4*x^2).

Original entry on oeis.org

1, 2, 3, 8, 12, 32, 48, 128, 192, 512, 768, 2048, 3072, 8192, 12288, 32768, 49152, 131072, 196608, 524288, 786432, 2097152, 3145728, 8388608, 12582912, 33554432, 50331648, 134217728, 201326592, 536870912, 805306368, 2147483648, 3221225472
Offset: 0

Views

Author

Paul Curtz, Jan 26 2008, Feb 09 2008

Keywords

Comments

A002001 interleaved with A081294. Gary W. Adamson, Jul 08 2012

Crossrefs

Programs

  • Maple
    A134683 := proc(n)
        if n =0 then
            1 ;
        else
            -(-1)^n*A131577(n-1)+2*procname(n-1) ;
        end if;
    end proc: # R. J. Mathar, Jul 22 2012
  • Mathematica
    CoefficientList[Series[1 + x*(2 + 3*x)/(1 - 4*x^2), {x, 0, 32}], x] (* Amiram Eldar, Aug 18 2022 *)

Formula

a(n) = 2*a(n-1)-(-1)^n*A131577(n-1), n>0.
a(n) = 4*a(n-2), n>2. Gary W. Adamson, Jul 08 2012
a(n) = 2^(n-3)*(7-(-1)^n), n>0. - R. J. Mathar, Jul 22 2012
Sum_{n>=0} 1/a(n) = 19/9. - Amiram Eldar, Aug 18 2022

Extensions

Edited by N. J. A. Sloane, Feb 20 2008

A304407 If n = Product (p_j^k_j) then a(n) = Product ((p_j - 1)*k_j).

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 3, 4, 4, 10, 4, 12, 6, 8, 4, 16, 4, 18, 8, 12, 10, 22, 6, 8, 12, 6, 12, 28, 8, 30, 5, 20, 16, 24, 8, 36, 18, 24, 12, 40, 12, 42, 20, 16, 22, 46, 8, 12, 8, 32, 24, 52, 6, 40, 18, 36, 28, 58, 16, 60, 30, 24, 6, 48, 20, 66, 32, 44, 24, 70, 12, 72, 36, 16
Offset: 1

Views

Author

Ilya Gutkovskiy, May 12 2018

Keywords

Examples

			a(60) = a(2^2*3*5) = (2 - 1)*2 * (3 - 1)*1 * (5 - 1)*1 = 16.
		

Crossrefs

Programs

  • Maple
    seq(mul((p-1)*padic[ordp](n, p), p in numtheory[factorset](n)), n=1..100); # Ridouane Oudra, Jun 06 2025
  • Mathematica
    a[n_] := Times @@ ((#[[1]] - 1) #[[2]] & /@ FactorInteger[n]); a[1] = 1; Table[a[n], {n, 75}]
    Table[EulerPhi[Last[Select[Divisors[n], SquareFreeQ]]] DivisorSigma[0, n/Last[Select[Divisors[n], SquareFreeQ]]], {n, 75}]
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); (p-1)*e)} \\ Andrew Howroyd, Jul 24 2018

Formula

a(n) = A005361(n)*abs(A023900(n)) = A005361(n)*A173557(n) = A005361(n)*A000010(A007947(n)).
a(p^k) = (p - 1)*k where p is a prime and k > 0.
a(n) = phi(n) if n is a squarefree (A005117), where phi() = A000010.
a(A002110(k)) = A005867(k).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^4/72) * Product_{p prime} (1 - 4/p^2 + 3/p^3 + 1/p^4 - 1/p^5) = 0.2644703894... . - Amiram Eldar, Nov 30 2022
a(n) = (-1)^A001221(n) * (Sum_{d1|n} Sum_{d2|n} mu(d1)*gcd(d1,d2)). - Ridouane Oudra, Jun 06 2025

A345907 Triangle giving the main antidiagonals of the matrices counting integer compositions by length and alternating sum (A345197).

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 2, 1, 1, 0, 0, 4, 3, 1, 1, 0, 0, 3, 6, 4, 1, 1, 0, 0, 6, 9, 8, 5, 1, 1, 0, 0, 0, 18, 18, 10, 6, 1, 1, 0, 0, 0, 10, 36, 30, 12, 7, 1, 1, 0, 0, 0, 20, 40, 60, 45, 14, 8, 1, 1, 0, 0, 0, 0, 80, 100, 90, 63, 16, 9, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 26 2021

Keywords

Comments

The matrices (A345197) count the integer compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2. Here, the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
Problem: What are the column sums? They appear to match A239201, but it is not clear why.

Examples

			Triangle begins:
   1
   1   1
   0   1   1
   0   1   1   1
   0   2   2   1   1
   0   0   4   3   1   1
   0   0   3   6   4   1   1
   0   0   6   9   8   5   1   1
   0   0   0  18  18  10   6   1   1
   0   0   0  10  36  30  12   7   1   1
   0   0   0  20  40  60  45  14   8   1   1
   0   0   0   0  80 100  90  63  16   9   1   1
   0   0   0   0  35 200 200 126  84  18  10   1   1
   0   0   0   0  70 175 400 350 168 108  20  11   1   1
   0   0   0   0   0 350 525 700 560 216 135  22  12   1   1
		

Crossrefs

Row sums are A163493.
Rows are the antidiagonals of the matrices given by A345197.
The main diagonals of A345197 are A346632, with sums A345908.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
Other diagonals are A008277 of A318393 and A055884 of A320808.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{n-k}],k==(n+ats[#])/2-1&]],{k,0,n-1}],{n,0,15}]

A098646 Trace sequence of 3 X 3 Krawtchouk matrix.

Original entry on oeis.org

3, 2, 12, 8, 48, 32, 192, 128, 768, 512, 3072, 2048, 12288, 8192, 49152, 32768, 196608, 131072, 786432, 524288, 3145728, 2097152, 12582912, 8388608, 50331648, 33554432, 201326592, 134217728, 805306368, 536870912, 3221225472, 2147483648
Offset: 0

Views

Author

Paul Barry, Sep 18 2004

Keywords

Comments

Let A=[1,1,1;2,0,-2;1,-1,1], the 3 X 3 Krawtchouk matrix. Then a(n)=trace(A^n).

Crossrefs

Programs

Formula

G.f.: (3+2*x)/((1+2*x)*(1-2*x)).
a(n) = (-2)^n+2*2^n.
Recurrence: a(n) = 4a(n-2), a(0)=3, a(1)=2. - Ralf Stephan, Jul 17 2013
a(2n+1)=A081294(n+1). a(2n)=A002001(n+1). - R. J. Mathar, Nov 11 2013

A178970 a(n) = 2^(2n-1) mod (2n+1).

Original entry on oeis.org

2, 3, 4, 2, 6, 7, 2, 9, 10, 2, 12, 8, 20, 15, 16, 2, 22, 19, 2, 21, 22, 38, 24, 32, 2, 27, 52, 2, 30, 31, 2, 8, 34, 2, 36, 37, 17, 43, 40, 20, 42, 8, 2, 45, 32, 2, 27, 49, 29, 51, 52, 23, 54, 55, 2, 57, 77, 11, 15, 28, 2, 108, 64, 2, 66, 32, 47, 69, 70, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 03 2011

Keywords

Examples

			a(1) = 2^(2*1-1) mod (2*1+1) = 2^1 mod 3 = 2.
		

Crossrefs

Cf. A000079.

Programs

  • Mathematica
    f[n_] := PowerMod[2, 2 n - 1, 2 n + 1]; Array[f, 70] (* Robert G. Wilson v, Jan 03 2011 *)

Formula

a(n) = A081294(n) mod A005408(n).
Previous Showing 61-70 of 103 results. Next