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 11-20 of 56 results. Next

A060747 a(n) = 2*n - 1.

Original entry on oeis.org

-1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151
Offset: 0

Views

Author

Henry Bottomley, Apr 26 2001

Keywords

Comments

If you put n red balls and n blue balls in a bag and draw them one by one without replacement, the probability of never having drawn equal numbers of the two colors before the final ball is drawn is 1/a(n) unsigned.
abs(a(n)) = 2n - 1 + 2*0^n. It has A048495 as binomial transform. - Paul Barry, Jun 09 2003
For n >= 1, a(n) = numbers k such that arithmetic mean of the first k positive integers is an integer. A040001(a(n)) = 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010
From Jaroslav Krizek, May 28 2010: (Start)
For n >= 1, a(n) = corresponding values of antiharmonic means to numbers from A016777 (numbers k such that antiharmonic mean of the first k positive integers is an integer).
a(n) = A000330(A016777(n)) / A000217(A016777(n)) = A146535(A016777(n)+1). (End)

Crossrefs

Programs

Formula

a(n) = A005408(n)-2 = A005843(n)-1 = -A000984(n)/A002420(n) = A001477(n)+A023443(n).
G.f.: (3*x - 1)/(1 - x)^2.
Abs(a(n)) = Sum_{k=0..n} (A078008(k) mod 4). - Paul Barry, Mar 12 2004
E.g.f.: exp(x)*(2*x-1). - Paul Barry, Mar 31 2007
a(n) = 2*a(n-1) - a(n-2); a(0)=-1, a(1)=1. - Philippe Deléham, Nov 03 2008
a(n) = 4*n - a(n-1) - 4 for n>0, with a(0)=-1. - Vincenzo Librandi, Aug 07 2010
a(n) = A161680(A005843(n))/n for n > 0. - Stefano Spezia, Feb 14 2025

A004273 0 together with odd numbers.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 0

Views

Author

Keywords

Comments

Also continued fraction for tanh(1) (A073744 is decimal expansion). - Rick L. Shepherd, Aug 07 2002
From Jaroslav Krizek, May 28 2010: (Start)
For n >= 1, a(n) = numbers k such that arithmetic mean of the first k positive integers is an integer. A040001(a(n)) = 1. See A145051 and A040001.
For n >= 1, a(n) = corresponding values of antiharmonic means to numbers from A016777 (numbers k such that antiharmonic mean of the first k positive integers is an integer).
a(n) = A000330(A016777(n)) / A000217(A016777(n)) = A146535(A016777(n)+1). (End)
If the n-th prime is denoted by p(n) then it appears that a(j) = distinct, increasing values of (Sum of the quadratic non-residues of p(n) - Sum of the quadratic residues of p(n)) / p(n) for each j. - Christopher Hunt Gribble, Oct 05 2010
A214546(a(n)) > 0. - Reinhard Zumkeller, Jul 20 2012
Dimension of the space of weight 2n+2 cusp forms for Gamma_0(6).
The size of a maximal 2-degenerate graph of order n-1 (this class includes 2-trees and maximal outerplanar graphs (MOPs)). - Allan Bickle, Nov 14 2021
Numbers not considered even for the purpose of roulette. J. Lowell, Apr 29 2025

Examples

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

Crossrefs

Cf. A110185, continued fraction expansion of 2*tanh(1/2), and A204877, continued fraction expansion of 3*tanh(1/3). [Bruno Berselli, Jan 26 2012]
Cf. A005408.

Programs

Formula

G.f.: x*(1+x)/(-1+x)^2. - R. J. Mathar, Nov 18 2007
a(n) = lodumo_2(A057427(n)). - Philippe Deléham, Apr 26 2009
Euler transform of length 2 sequence [3, -1]. - Michael Somos, Jul 03 2014
a(n) = (4*n - 1 - (-1)^(2^n))/2. - Luce ETIENNE, Jul 11 2015

A103451 Triangular array T read by rows: T(n, 0) = T(n, n) = 1, T(n, k) = 0 for 0 < k < n.

Original entry on oeis.org

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

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

Equals Pascal's triangle (A007318) where all elements > 1 are replaced with zero. Therefore it might be called "binomial skeleton".
Row sums are in A040000, antidiagonal sums are in A040001. When construed as a lower triangular matrix, the matrix inverse is A103452.

Examples

			First few rows are:
  1;
  1, 1;
  1, 0, 1;
  1, 0, 0, 1;
  1, 0, 0, 0, 1;
  1, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Programs

  • Magma
    r:=14; T:=ScalarMatrix(r, 1); for n in [1..r] do T[n, 1]:=1; end for; &cat[ [ T[n, k]: k in [1..n] ]: n in [1..r] ];
    
  • Magma
    /* As triangle */ [[Binomial(n, k-n)+Binomial(n, -k)-Binomial(0, n+k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 20 2016
    
  • Mathematica
    Table[Boole[n == 0 || Mod[k, n] == 0], {n, 0, 14}, {k, 0, n}] (* or *)
    Table[Binomial[n, k - n] + Binomial[n, -k] - Binomial[0, n + k], {n, 0, 14}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 19 2016 *)
  • PARI
    for(n=0,15, for(k=0,n, print1(if(k==0||k==n, 1, 0), ", "))) \\ G. C. Greubel, Dec 08 2018
    
  • Python
    from math import isqrt, comb
    def A103451(n):
        if n==0: return 1
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        return int(not (n-comb(a+1,2))%a) # Chai Wah Wu, Jun 24 2025
  • Sage
    def A103451(n,k): return 1 if (k==0 or k==n) else 0
    flatten([[A103451(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Feb 14 2021
    

Formula

a(n) = A097806(n-1) for n > 0. - Philippe Deléham, Oct 16 2007
T(n,k) = C(n,k-n) + C(n,-k) - C(0,n+k), 0 <= k <= n. - Eric Werley, Jul 01 2011
From Stefano Spezia, Jul 04 2024: (Start)
G.f.: (1 - x^2*y)/((1 - x)*(1 - x*y)).
E.g.f.: BesselI(0, 2*sqrt(x*y)) + exp(x) - 1. (End)

Extensions

Edited by Klaus Brockhaus, Jan 26 2011

A134451 Ternary digital root of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 27 2007

Keywords

Comments

Continued fraction expansion of sqrt(3) - 1. - N. J. A. Sloane, Dec 17 2007. Cf. A040001, A048878/A002530.
Minimum number of terms required to express n as a sum of odd numbers.
Shadow transform of even numbers A005843. - Michel Marcus, Jun 06 2013
From Jianing Song, Nov 01 2022: (Start)
For n > 0, a(n) is the minimal gap of distinct numbers coprime to n. Proof: denote the minimal gap by b(n). For odd n we have A058026(n) > 0, hence b(n) = 1. For even n, since 1 and -1 are both coprime to n we have b(n) <= 2, and that b(n) >= 2 is obvious.
The maximal gap is given by A048669. (End)

Examples

			n=42: A007089(42) = '1120', A053735(42) = 1+1+2+0 = 4,
A007089(4)='11', A053735(4)=1+1=2: therefore a(42) = 2.
0.732050807568877293527446341... = 0 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...)))). - _Harry J. Smith_, May 31 2009
		

Crossrefs

Cf. A000010, A055034, A134452, A160390 (decimal expansion).
Apart from a(0) the same as A040001.
Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1).

Programs

Formula

a(n) = n if n <= 2, otherwise a(A053735(n)).
a(A005408(n)) = 1; a(A005843(n)) = 2 for n>0;
a(n) = 0 if n=0, otherwise A000034(n-1).
a(n) = ((n+1) mod 2) + 2*sign(n) - 1. - Wesley Ivan Hurt, Dec 06 2013
Multiplicative with a(2^e) = 2, a(p^e) = 1 for odd prime p. - Andrew Howroyd, Aug 06 2018
a(0) = A055034(1) / A000010(1), a(n) = A000010(n+1) / A055034(n+1), n>1. - Torlach Rush, Oct 29 2019
Dirichlet g.f.: zeta(s)*(1+1/2^s). - Amiram Eldar, Jan 01 2023

A220122 Number A(n,k) of tilings of a k X n rectangle using integer-sided rectangular tiles of area k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 5, 1, 1, 1, 1, 1, 3, 3, 8, 1, 1, 1, 1, 2, 1, 9, 4, 13, 1, 1, 1, 1, 1, 4, 1, 16, 6, 21, 1, 1, 1, 1, 2, 1, 7, 2, 35, 9, 34, 1, 1, 1, 1, 1, 3, 1, 13, 3, 65, 13, 55, 1, 1, 1, 1, 2, 2, 9, 1, 46, 4, 143, 19, 89, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Dec 05 2012

Keywords

Comments

Row n gives: 1 followed by period A003418(n): (1, A000045(n+1), ...) repeated; offset 0.

Examples

			A(4,4) = 9, because there are 9 tilings of a 4 X 4 rectangle using integer-sided rectangular tiles of area 4:
._._._._.  ._______.  .___.___.  ._.___._.  ._______.
| | | | |  |_______|  |   |   |  | |   | |  |_______|
| | | | |  |_______|  |___|___|  | |___| |  |   |   |
| | | | |  |_______|  |   |   |  | |   | |  |___|___|
|_|_|_|_|  |_______|  |___|___|  |_|___|_|  |_______|
._._.___.  ._______.  .___._._.  .___.___.
| | |   |  |_______|  |   | | |  |   |   |
| | |___|  |_______|  |___| | |  |___|___|
| | |   |  |   |   |  |   | | |  |_______|
|_|_|___|  |___|___|  |___|_|_|  |_______|
Square array A(n,k) begins:
1, 1,  1,  1,   1, 1,    1, 1,    1,  1,   1, ...
1, 1,  1,  1,   1, 1,    1, 1,    1,  1,   1, ...
1, 1,  2,  1,   2, 1,    2, 1,    2,  1,   2, ...
1, 1,  3,  2,   3, 1,    4, 1,    3,  2,   3, ...
1, 1,  5,  3,   9, 1,    7, 1,    9,  3,   5, ...
1, 1,  8,  4,  16, 2,   13, 1,   16,  4,   9, ...
1, 1, 13,  6,  35, 3,   46, 1,   35,  6,  15, ...
1, 1, 21,  9,  65, 4,   88, 2,   65,  9,  26, ...
1, 1, 34, 13, 143, 5,  209, 3,  250, 13,  44, ...
1, 1, 55, 19, 281, 6,  473, 4,  495, 37,  75, ...
1, 1, 89, 28, 590, 8, 1002, 5, 1209, 64, 254, ...
		

Crossrefs

Columns k=0+1, 2-11, 13 give: A000012, A000045(n+1), A000930, A220123, A003520, A220124, A005709, A220125, A220126, A220127, A017905(n+11), A017907(n+13).
Main diagonal gives: A182106.

Programs

  • Maple
    b:= proc(n, l) option remember; local i, k, m, s, t;
          if max(l[])>n then 0 elif n=0 or l=[] then 1
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od; s, m:=0, nops(l);
             for i from k to m while l[i]=0 do if irem(m, 1+i-k, 'q')=0
               and q<=n then s:= s+ b(n, [l[j]$j=1..k-1, q$j=k..i,
               l[j]$j=i+1..m]) fi od; s
          fi
        end:
    A:= (n, k)-> b(n, [0$k]):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{i, k, m, s, t}, Which[Max[l] > n, 0, n == 0 || l == {}, 1, Min[l] > 0, t = Min[l]; b[n-t, l-t], True, k = Position[l, 0, 1][[1, 1]]; {s, m} = {0, Length[l]}; For[ i = k , i <= m && l[[i]] == 0, i++, If[Mod[m, 1+i-k ] == 0 && (q = Quotient[m, 1+i-k]) <= n, s = s+b[n, Join[ l[[1 ;; k-1]], Array[q &, i-k+1], l[[i+1 ;; m]] ]]]]; s]]; a[n_, k_] := b[n, Array[0&, k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 19 2013, translated from Maple *)

Formula

For prime p column p has g.f.: 1/(1-x-x^p) or a_p(n) = Sum_{j=0..floor(n/p)} C(n-(p-1)*j,j).

A010121 Continued fraction for sqrt(7).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is a basic member of a family of 4-periodic multiplicative sequences with two parameters (c1,c2), defined for n >= 1 by a(n)=1 if n is odd, a(n)=c1 if n == 0 (mod 4) and a(n)=c2 if n == 2 (mod 4). Here, (c1,c2)=(4,1).
The Dirichlet generating function is (1+(c2-1)/2^s+(c1-c2)/4^s)*zeta(s).
Other members are A010123 with parameters (6,2), A010127 (8,3), A010130 (10,1), A010131 (10,2), A010132 (10,4), A010137 (12,5), A010146 (14,6), A089146 (4,8), A109008 (4,2), A112132 (7,3). If c1=c2, this reduces to the cases discussed in A040001. - R. J. Mathar, Feb 18 2011

Examples

			2.645751311064590590501615753...  = A010465 = 2 + 1/(1 + 1/(1 + 1/(1 + 1/(4 + ...)))).
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A010465 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Sqrt[7],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    CoefficientList[Series[(2 x^2 + 3 x + 2) (x^2 - x + 1) / ((1 - x) (1 + x) (x^2 + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 26 2016 *)
    PadRight[{2},120,{4,1,1,1}] (* Harvey P. Dale, Nov 30 2019 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 13000); x=contfrac(sqrt(7)); for (n=0, 20000, write("b010121.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009

Formula

From R. J. Mathar, Jun 17 2009: (Start)
G.f.: -(2*x^2+3*x+2)*(x^2-x+1)/((x-1)*(1+x)*(x^2+1)).
a(n) = a(n-4), n > 4. (End)
a(n) = (7 + 3*(-1)^n + 3*(-i)^n + 3*i^n)/4, n > 0, where i is the imaginary unit. - Bruno Berselli, Feb 18 2011

A129194 a(n) = (n/2)^2*(3 - (-1)^n).

Original entry on oeis.org

0, 1, 2, 9, 8, 25, 18, 49, 32, 81, 50, 121, 72, 169, 98, 225, 128, 289, 162, 361, 200, 441, 242, 529, 288, 625, 338, 729, 392, 841, 450, 961, 512, 1089, 578, 1225, 648, 1369, 722, 1521, 800, 1681, 882, 1849, 968, 2025, 1058, 2209, 1152, 2401, 1250, 2601, 1352
Offset: 0

Views

Author

Paul Barry, Apr 02 2007

Keywords

Comments

The numerator of the integral is 2,1,2,1,2,1,...; the moments of the integral are 2/(n+1)^2. See 2nd formula.
The sequence alternates between twice a square and an odd square, A001105(n) and A016754(n).
Partial sums of the positive elements give the absolute values of A122576. - Omar E. Pol, Aug 22 2011
Partial sums of the positive elements give A212760. - Omar E. Pol, Dec 28 2013
Conjecture: denominator of 4/n - 2/n^2. - Wesley Ivan Hurt, Jul 11 2016
Multiplicative because both A000290 and A040001 are. - Andrew Howroyd, Jul 25 2018

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis II (Springer 1924, reprinted 1976), Part Eight, Chap. 1, Sect. 7, Problem 73.

Crossrefs

Programs

Formula

G.f.: x*(1 + 2*x + 6*x^2 + 2*x^3 + x^4)/(1-x^2)^3.
a(n+1) = denominator((1/(2*Pi))*Integral_{t=0..2*Pi} exp(i*n*t)(-((Pi-t)/i)^2)), i=sqrt(-1).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n > 5. - Paul Curtz, Mar 07 2011
a(n) is the numerator of the coefficient of x^4 in the Maclaurin expansion of exp(-n*x^2). - Francesco Daddi, Aug 04 2011
O.g.f. as a Lambert series: x*Sum_{n >= 1} J_2(n)*x^n/(1 + x^n), where J_2(n) denotes the Jordan totient function A007434(n). See Pólya and Szegő. - Peter Bala, Dec 28 2013
From Ilya Gutkovskiy, Jul 11 2016: (Start)
E.g.f.: x*((2*x + 1)*sinh(x) + (x + 2)*cosh(x))/2.
Sum_{n>=1} 1/a(n) = 5*Pi^2/24. [corrected by Amiram Eldar, Sep 11 2022] (End)
a(n) = A000290(n) / A040001(n). - Andrew Howroyd, Jul 25 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/24 (A222171). - Amiram Eldar, Sep 11 2022
From Peter Bala, Jan 16 2024: (Start)
a(n) = Sum_{1 <= i, j <= n} (-1)^(1 + gcd(i,j,n)) = Sum_{d | n} (-1)^(d+1) * J_2(n/d), that is, the Dirichlet convolution of the pair of multiplicative functions f(n) = (-1)^(n+1) and the Jordan totient function J_2(n) = A007434(n). Hence this sequence is multiplicative. Cf. A193356 and A309337.
Dirichlet g.f.: (1 - 2/2^s)*zeta(s-2). (End)
a(n) = Sum_{1 <= i, j <= n} (-1)^(n + gcd(i, n)*gcd(j, n)) = Sum_{d|n, e|n} (-1)^(n+e*d) * phi(n/d)*phi(n/e). - Peter Bala, Jan 22 2024

Extensions

More terms from Michel Marcus, Dec 28 2013

A133566 Triangle read by rows: (1,1,1,...) on the main diagonal and (0,1,0,1,...) on the subdiagonal.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Sep 16 2007

Keywords

Comments

Usually regarded as a square matrix T when combined with other matrices and column vectors.
Then T * V, where V = any sequence regarded as a column vector with offset 1 is a new sequence S [called an interpolation transform] given by S(2n) = V(2n), S(2n-1) = V(2n) + V(2n-1). Example: If T * [1,2,3,...], S = [1, 2, 5, 4, 9, 6, 13, 8, 17, ...) = A114752. A133080 is identical to A133566 except that the subdiagonal = (1,0,1,0,...). A133080 * [1,2,3,...] = A114753: (1, 3, 3, 7, 5, 11, 7, 15, 9, 19, ...).
Triangle T(n,k), 0 <= k <= n, read by rows given by [0,1,-1,0,0,0,0,0,0,...] DELTA [1,0,-2,1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 15 2007

Examples

			First few rows of the triangle:
  1;
  0, 1;
  0, 1, 1;
  0, 0, 0, 1;
  0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A133566 := proc(n,k)
        if n = k then
            1;
        elif  k=n-1 and type(n,odd) then
            1;
        else
            0 ;
        end if;
    end proc: # R. J. Mathar, Jun 20 2015
  • Mathematica
    T[n_, k_] := Which[n == k, 1, k == n - 1 && OddQ[n], 1, True, 0];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 24 2023 *)

Formula

Odd rows: (n-2) zeros followed by 1, 1. Even rows: (n-1) zeros followed by 1.
Sum_{k=0..n} T(n,k) = A040001(n). - Philippe Deléham, Dec 15 2007
G.f.: (-1-x*y-x^2*y)*x*y/((-1+x*y)*(1+x*y)). - R. J. Mathar, Aug 11 2015

Extensions

Entry revised by N. J. A. Sloane, Jun 20 2015

A145051 Numerator of the first convergent to sqrt(n) using the recursion x = (n/x + x)/2.

Original entry on oeis.org

1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75
Offset: 1

Views

Author

Cino Hilliard, Sep 30 2008

Keywords

Comments

This is the same as A026741 without the first 2 terms in A026741. The link describes the experimental derivation of the generating function.
From Jaroslav Krizek, May 28 2010: (Start)
Numerators of arithmetic means of the first n positive integers for n >= 1.
See A040001 - denominators of arithmetic means of the first n positive integers.
a(n) = A026741(n+1) = A000217(n) * A040001(n) / n. (End)
Minimum number of line segments to draw into a circle to partition the circle into n+1 congruent circular sectors, i.e., minimum number of straight cuts required to cut a circular cake into n+1 equal slices. - Felix Fröhlich, Sep 01 2015
Continued fraction expansion of A386934. - Kelvin Voskuijl, Aug 15 2025

Examples

			n=1, x=1; x = (1/1+1)/2 = 1/1;
n=2, x=1; x = (2/1+1)/2 = 3/2;
n=3, x=1; x = (3/1+1)/2 = 2/1.
G.f.: x + 3*x^2 + 2*x^3 + 5*x^4 + 3*x^5 + 7*x^6 + 4*x^7 + 9*x^8 + 5*x^9 + ...
		

Crossrefs

Programs

  • Magma
    [(n+1)*(3 - (-1)^(n-1))/4: n in [1..100]]; // Vincenzo Librandi, Sep 02 2015
  • Mathematica
    lst={};Do[a=n^2+n;b=n^2-n;c=a/b;AppendTo[lst,Denominator[c]],{n,2,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 20 2009 *)
  • PARI
    g(n, p) = x=1;for(j=1,p,x=(n/x+x)/2; if(j==1, print1(numerator(x), ",")))
    for(k=1,100,g(k,1))
    

Formula

From Paul Barry, Nov 22 2009: (Start)
G.f.: x*(1 + 3*x - x^3)/(1 - x^2)^2.
a(n+1) = (n + 2)*(3 - (-1)^n)/4;
a(n+1) = Sum_{k=0..n, if(k=floor(n/2) or k=floor((n+1)/2),1,0)*(k+1)}. (End)
E.g.f.: ((x + 2)*cosh(x) + (2*x + 1)*sinh(x) - 2)/2. - Stefano Spezia, Apr 04 2024

A069735 Number of regular orientable coverings of the Klein bottle with 2n lists.

Original entry on oeis.org

1, 3, 2, 5, 2, 6, 2, 7, 3, 6, 2, 10, 2, 6, 4, 9, 2, 9, 2, 10, 4, 6, 2, 14, 3, 6, 4, 10, 2, 12, 2, 11, 4, 6, 4, 15, 2, 6, 4, 14, 2, 12, 2, 10, 6, 6, 2, 18, 3, 9, 4, 10, 2, 12, 4, 14, 4, 6, 2, 20, 2, 6, 6, 13, 4, 12, 2, 10, 4, 12, 2, 21, 2, 6, 6, 10, 4, 12, 2, 18, 5, 6, 2, 20, 4, 6, 4, 14, 2, 18
Offset: 1

Views

Author

Valery A. Liskovets, Apr 07 2002

Keywords

Comments

Dirichlet convolution of A000012 by A040001. - R. J. Mathar, Mar 30 2011
a(n) is the number of full-dimensional lattices with volume n in Z^2 which are symmetric about a coordinate axis (equivalently, about both). - Álvar Ibeas, Mar 19 2021

Examples

			x + 3*x^2 + 2*x^3 + 5*x^4 + 2*x^5 + 6*x^6 + 2*x^7 + 7*x^8 + 3*x^9 + 6*x^10 + ...
		

Crossrefs

Equals row sums of triangle A143110. - Gary W. Adamson, Jul 25 2008

Programs

  • Maple
    read("transforms") : nmax := 100 :
    L := [1,1,seq(0,i=1..nmax)] :
    MOBIUSi(%) :
    MOBIUSi(%) ; # R. J. Mathar, Sep 25 2017
    with(NumberTheory): seq(tau(n) + `if`(n::odd, 0, tau(n/2)), n=1..100); # Peter Luschny, Mar 19 2021
  • Mathematica
    d[n_] := DivisorSigma[0, n];
    a[n_] := If[EvenQ[n], d[n] + d[n/2], d[n]];
    Array[a, 100] (* Jean-François Alcover, Aug 27 2019 *)
  • PARI
    {a(n) = if( n<1, 0, numdiv(n) + if( n%2, 0, numdiv( n / 2)))} /* Michael Somos, Mar 24 2012 */

Formula

Multiplicative with a(2^e)=2e+1 and a(p^e)=e+1 for e>0 and an odd prime p.
a(n) = d(n)+d(n/2) for even n and a(n) = d(n) otherwise where d(n) is the number of divisors of n (A000005).
G.f.: Sum_{k>0} x^k*(1+2*x^k)/(1-x^(2*k)). - Vladeta Jovovic, Dec 16 2002
Dirichlet g.f.: (1+2^(-s))*zeta^2(s) [ Rutherford]. - N. J. A. Sloane, Feb 23 2009
Moebius transform is period 2 sequence [ 1, 2, ...]. - Michael Somos, Mar 24 2012
a(2*n - 1) = A099774(n).
a(n) = Sum_{ m: m^2|n } A304182(n/m^2). - Andrey Zabolotskiy, May 07 2018
Sum_{k=1..n} a(k) ~ 3*n*log(n)/2 + (3*gamma - 3/2 - log(2)/2)*n, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Oct 04 2019
a(n) = 3*tau(n) - tau(2*n). - Ridouane Oudra, Mar 15 2021
a(n) = A320111(n) + (A059841(n)*A000005(n)), i.e. a(n) = A320111(n) if n is odd, and a(n) = A320111(n) + A000005(n) if n is even. - Antti Karttunen, Mar 17 2021
a(n) = A000005(n) + A183063(n) = 2*A000005(n) - A001227(n). - Amiram Eldar, Dec 22 2023

Extensions

Corrected by T. D. Noe, Nov 13 2006
Previous Showing 11-20 of 56 results. Next