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

A214630 a(n) is the reduced numerator of 1/4 - 1/A109043(n)^2 = (1 - 1/A026741(n)^2)/4.

Original entry on oeis.org

-1, 0, 0, 2, 3, 6, 2, 12, 15, 20, 6, 30, 35, 42, 12, 56, 63, 72, 20, 90, 99, 110, 30, 132, 143, 156, 42, 182, 195, 210, 56, 240, 255, 272, 72, 306, 323, 342, 90, 380, 399, 420, 110, 462, 483, 506, 132, 552, 575, 600, 156
Offset: 0

Views

Author

Paul Curtz, Jul 23 2012

Keywords

Comments

The unreduced fractions are -1/0, 0/4, 0/1, 8/36, 3/16, 24/100, 2/9, 48/196, 15/64, 80/324, 6/25, ... = c(n)/A061038(n), say.
Note that c(n)=A061037(n) + (period of length 2: repeat 0, 3).
c(n) is a permutation of A198442(n). The corresponding ranks are (the 0's have been swapped for convenience) 0,2,1,6,4,10,... = A145979(n-2).
Define the following sequences, satisfying the recurrence a(n) = 2*a(n-4) - a(n-8),
e(n) = -1, 0, 0, 2, 1, 4, 1, 6, 3, 8, 2, 10, 5, ... (after -1, a permutation of A004526(n) or mix A026741(n-1), 2*n),
f(n) = 1, 2, 1, 4, 3, 6, 2, 8, 5, 10, 3, 12, 7, ..., (another permutation of A004526(n+2) or mix A026741(n+1), 2*n+2).
f(n) - e(n) = periodic of period length 4: repeat 2, 2, 1, 2.
e(n) + f(n) = 0, 2, 1, 6, 4, 10, ... = A145979(n-2).
Then c(n) = e(n)*f(n).
Note that A061038(n) - 4*c(n) = periodic of period length 4: repeat 4, 4, 1, 4.
After division (by period 2: repeat 1, 4, A010685(n)), the reduced fractions of c(n) are -1/0, 0/1 ?, 0/4 ?, 2/9, 3/16, 6/25, 2/9, 12/49, 15/64, 20/81, 6/25, ... = a(n)/b(n).
Note that a(1+4*n) + a(2+4*n) + a(3+4*n) = 2,20,56,... = A002378(1+3*n) = A194767(3*n).
A061037(n-2) - a(n-2) = 0, -3, 0, -3, 0, 3, 0, 15, 0, 33, 0, 57, ... = Fip(n-2).
Fip(n-2)/3 = 0,-1,0,-1,0,1,0,5,0,11,0,19,0,29, .... Without 0's: A165900(n) (a Fibonacci polynomial); also -A110331(n+1) (Pell numbers).
g(n) = -1, 0, 0, 1, 1, 2, 1, 3, 3, 4, ... = mix A026741(n-1), n.
h(n) = 1, 1, 1, 2, 3, 3, 2, 4, 5, 5, ... = mix A026741(n+1), n+1.
h(n) - g(n) = (period 2: repeat 2, 1, 1, 1 = A177704(n-1)).
k(n) = 1, 1, 0, 2, 3, 3, 1, 4, 5, 5, ... = mix A174239(n), n+1.
l(n) = -1, 0, 1, 1, 1, 2, 2, 3, 3, 4, ... .
k(n) - l(n) = period 4: repeat 2, 1, -1, 1.
2) By the second formula in the definition, we take first 1 - 1/A026741(n)^2.
Hence, using a convention for the first fraction, -1/0, 0/1, 0/1, 8/9, 3/4, 24/25, 8/9, 48/49, 15/16, 80/81, 24/25, ... = (A005563(n-1) - A033996(n))/A168077(n) = q(n)/A168077(n).
For a(n), we divide by 4.
Note that A214297 is the reduced numerator of 1/4 - 1/A061038(n).
Note also that A168077(n) = A026741(n)^2.

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3))); // G. C. Greubel, Sep 20 2018
  • Mathematica
    CoefficientList[Series[(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3), {x, 0, 50}], x] (* G. C. Greubel, Sep 20 2018 *)
    LinearRecurrence[{0,0,0,3,0,0,0,-3,0,0,0,1},{-1,0,0,2,3,6,2,12,15,20,6,30},60] (* Harvey P. Dale, Jul 01 2019 *)
  • PARI
    Vec(-(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((x-1)^3*(x+ 1)^3*(x^2+1)^3) + O(x^100)) \\ Colin Barker, Jan 22 2015
    

Formula

a(4*n) = 4*n^2-1 = (2*n-1)*(2*n+1), a(2*n+1) = a(4*n+2) = n(n+1).
a(n)= A198442(n)/(period of length 4: repeat 1,1,4,1=A010121(n+2)).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12). Is this the shortest possible recurrence? See A214297.
a(n+2) - a(n-2) = 0, 2, 4, 6, 2, 10, 12, 14, 4, ... = 2*A214392(n). a(-2)=a(-1)=0=a(1)=a(2).
a(n+4) - a(n-4) = 0, 4, 2, 12, 16, 20, 6, 28, 32, 36,... = 2*A188167(n). a(-4)=3=a(4), a(-3)=2=a(3).
a(n) = g(n) * h(n).
a(n) = k(n) * l(n).
G.f.: -(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, Jan 22 2015
From Luce ETIENNE, Apr 08 2017: (Start)
a(n) = (13*n^2-28-3*(n^2+4)*(-1)^n+3*(n^2-4)*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((2*n+1-(-1)^n)/4)))/64.
a(n) = (13*n^2-28-3*(n^2+4)*cos(n*Pi)+6*(n^2-4)*cos(n*Pi/2))/64. (End)

Extensions

Edited by N. J. A. Sloane, Aug 04 2012

A204892 Least k such that n divides s(k)-s(j) for some j in [1,k), where s(k)=prime(k).

Original entry on oeis.org

2, 3, 3, 4, 4, 5, 7, 5, 5, 6, 6, 7, 10, 7, 7, 8, 8, 9, 13, 9, 9, 10, 16, 10, 16, 10, 10, 11, 11, 12, 19, 12, 20, 12, 12, 13, 22, 13, 13, 14, 14, 15, 24, 15, 15, 16, 25, 16, 26, 16, 16, 17, 29, 17, 30, 17, 17, 18, 18, 19, 31, 19, 32, 19, 19, 20, 33, 20, 20, 21
Offset: 1

Views

Author

Clark Kimberling, Jan 20 2012

Keywords

Comments

Suppose that (s(i)) is a strictly increasing sequence in the set N of positive integers. For i in N, let r(h) be the residue of s(i+h)-s(i) mod n, for h=1,2,...,n+1. There are at most n distinct residues r(h), so that there must exist numbers h and h' such that r(h)=r(h'), where 0<=h
Corollary: for each n, there are infinitely many pairs (j,k) such that n divides s(k)-s(j), and this result holds if s is assumed unbounded, rather than strictly increasing.
Guide to related sequences:
...
s(n)=prime(n), primes
... k(n), j(n): A204892, A204893
... s(k(n)),s(j(n)): A204894, A204895
... s(k(n))-s(j(n)): A204896, A204897
s(n)=prime(n+1), odd primes
... k(n), j(n): A204900, A204901
... s(k(n)),s(j(n)): A204902, A204903
... s(k(n))-s(j(n)): A109043(?), A000034(?)
s(n)=prime(n+2), primes >=5
... k(n), j(n): A204908, A204909
... s(k(n)),s(j(n)): A204910, A204911
... s(k(n))-s(j(n)): A109043(?), A000034(?)
s(n)=prime(n)*prime(n+1) product of consecutive primes
... k(n), j(n): A205146, A205147
... s(k(n)),s(j(n)): A205148, A205149
... s(k(n))-s(j(n)): A205150, A205151
s(n)=(prime(n+1)+prime(n+2))/2: averages of odd primes
... k(n), j(n): A205153, A205154
... s(k(n)),s(j(n)): A205372, A205373
... s(k(n))-s(j(n)): A205374, A205375
s(n)=2^(n-1), powers of 2
... k(n), j(n): A204979, A001511(?)
... s(k(n)),s(j(n)): A204981, A006519(?)
... s(k(n))-s(j(n)): A204983(?), A204984
s(n)=2^n, powers of 2
... k(n), j(n): A204987, A204988
... s(k(n)),s(j(n)): A204989, A140670(?)
... s(k(n))-s(j(n)): A204991, A204992
s(n)=C(n+1,2), triangular numbers
... k(n), j(n): A205002, A205003
... s(k(n)),s(j(n)): A205004, A205005
... s(k(n))-s(j(n)): A205006, A205007
s(n)=n^2, squares
... k(n), j(n): A204905, A204995
... s(k(n)),s(j(n)): A204996, A204997
... s(k(n))-s(j(n)): A204998, A204999
s(n)=(2n-1)^2, odd squares
... k(n), j(n): A205378, A205379
... s(k(n)),s(j(n)): A205380, A205381
... s(k(n))-s(j(n)): A205382, A205383
s(n)=n(3n-1), pentagonal numbers
... k(n), j(n): A205138, A205139
... s(k(n)),s(j(n)): A205140, A205141
... s(k(n))-s(j(n)): A205142, A205143
s(n)=n(2n-1), hexagonal numbers
... k(n), j(n): A205130, A205131
... s(k(n)),s(j(n)): A205132, A205133
... s(k(n))-s(j(n)): A205134, A205135
s(n)=C(2n-2,n-1), central binomial coefficients
... k(n), j(n): A205010, A205011
... s(k(n)),s(j(n)): A205012, A205013
... s(k(n))-s(j(n)): A205014, A205015
s(n)=(1/2)C(2n,n), (1/2)*(central binomial coefficients)
... k(n), j(n): A205386, A205387
... s(k(n)),s(j(n)): A205388, A205389
... s(k(n))-s(j(n)): A205390, A205391
s(n)=n(n+1), oblong numbers
... k(n), j(n): A205018, A205028
... s(k(n)),s(j(n)): A205029, A205030
... s(k(n))-s(j(n)): A205031, A205032
s(n)=n!, factorials
... k(n), j(n): A204932, A204933
... s(k(n)),s(j(n)): A204934, A204935
... s(k(n))-s(j(n)): A204936, A204937
s(n)=n!!, double factorials
... k(n), j(n): A204982, A205100
... s(k(n)),s(j(n)): A205101, A205102
... s(k(n))-s(j(n)): A205103, A205104
s(n)=3^n-2^n
... k(n), j(n): A205000, A205107
... s(k(n)),s(j(n)): A205108, A205109
... s(k(n))-s(j(n)): A205110, A205111
s(n)=Fibonacci(n+1)
... k(n), j(n): A204924, A204925
... s(k(n)),s(j(n)): A204926, A204927
... s(k(n))-s(j(n)): A204928, A204929
s(n)=Fibonacci(2n-1)
... k(n), j(n): A205442, A205443
... s(k(n)),s(j(n)): A205444, A205445
... s(k(n))-s(j(n)): A205446, A205447
s(n)=Fibonacci(2n)
... k(n), j(n): A205450, A205451
... s(k(n)),s(j(n)): A205452, A205453
... s(k(n))-s(j(n)): A205454, A205455
s(n)=Lucas(n)
... k(n), j(n): A205114, A205115
... s(k(n)),s(j(n)): A205116, A205117
... s(k(n))-s(j(n)): A205118, A205119
s(n)=n*(2^(n-1))
... k(n), j(n): A205122, A205123
... s(k(n)),s(j(n)): A205124, A205125
... s(k(n))-s(j(n)): A205126, A205127
s(n)=ceiling[n^2/2]
... k(n), j(n): A205394, A205395
... s(k(n)),s(j(n)): A205396, A205397
... s(k(n))-s(j(n)): A205398, A205399
s(n)=floor[(n+1)^2/2]
... k(n), j(n): A205402, A205403
... s(k(n)),s(j(n)): A205404, A205405
... s(k(n))-s(j(n)): A205406, A205407

Examples

			Let s(k)=prime(k).  As in A204890, the ordering of differences s(k)-s(j), follows from the arrangement shown here:
k...........1..2..3..4..5...6...7...8...9
s(k)........2..3..5..7..11..13..17..19..23
...
s(k)-s(1)......1..3..5..9..11..15..17..21..27
s(k)-s(2).........2..4..8..10..14..16..20..26
s(k)-s(3)............2..6..8...12..14..18..24
s(k)-s(4)...............4..6...10..12..16..22
...
least (k,j) such that 1 divides s(k)-s(j) for some j is (2,1), so a(1)=2.
least (k,j) such that 2 divides s(k)-s(j): (3,2), so a(2)=3.
least (k,j) such that 3 divides s(k)-s(j): (3,1), so a(3)=3.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Prime[n]; z1 = 400; z2 = 50;
    Table[s[n], {n, 1, 30}]          (* A000040 *)
    u[m_] := u[m] = Flatten[Table[s[k] - s[j],
       {k, 2, z1}, {j, 1, k - 1}]][[m]]
    Table[u[m], {m, 1, z1}]          (* A204890 *)
    v[n_, h_] := v[n, h] = If[IntegerQ[u[h]/n], h, 0]
    w[n_] := w[n] = Table[v[n, h], {h, 1, z1}]
    d[n_] := d[n] = First[Delete[w[n],
       Position[w[n], 0]]]
    Table[d[n], {n, 1, z2}]          (* A204891 *)
    k[n_] := k[n] = Floor[(3 + Sqrt[8 d[n] - 1])/2]
    m[n_] := m[n] = Floor[(-1 + Sqrt[8 n - 7])/2]
    j[n_] := j[n] = d[n] - m[d[n]] (m[d[n]] + 1)/2
    Table[k[n], {n, 1, z2}]          (* A204892 *)
    Table[j[n], {n, 1, z2}]          (* A204893 *)
    Table[s[k[n]], {n, 1, z2}]       (* A204894 *)
    Table[s[j[n]], {n, 1, z2}]       (* A204895 *)
    Table[s[k[n]] - s[j[n]], {n, 1, z2}]     (* A204896 *)
    Table[(s[k[n]] - s[j[n]])/n, {n, 1, z2}] (* A204897 *)
    (* Program 2: generates A204892 and A204893 rapidly *)
    s = Array[Prime[#] &, 120];
    lk = Table[NestWhile[# + 1 &, 1, Min[Table[Mod[s[[#]] - s[[j]], z], {j, 1, # - 1}]] =!= 0 &], {z, 1, Length[s]}]
    Table[NestWhile[# + 1 &, 1, Mod[s[[lk[[j]]]] - s[[#]], j] =!= 0 &], {j, 1, Length[lk]}]
    (* Peter J. C. Moses, Jan 27 2012 *)
  • PARI
    a(n)=forprime(p=n+2,,forstep(k=p%n,p-1,n,if(isprime(k), return(primepi(p))))) \\ Charles R Greathouse IV, Mar 20 2013

A026741 a(n) = n if n odd, n/2 if n even.

Original entry on oeis.org

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

Author

J. Carl Bellinger (carlb(AT)ctron.com)

Comments

a(n) is the size of largest conjugacy class in D_2n, the dihedral group with 2n elements. - Sharon Sela (sharonsela(AT)hotmail.com), May 14 2002
a(n+1) is the composition length of the n-th symmetric power of the natural representation of a finite subgroup of SL(2,C) of type D_4 (quaternion group). - Paul Boddington, Oct 23 2003
For n > 1, a(n) is the greatest common divisor of all permutations of {0, 1, ..., n} treated as base n + 1 integers. - David Scambler, Nov 08 2006 (see the Mathematics Stack Exchange link below).
From Dimitrios Choussos (choussos(AT)yahoo.de), May 11 2009: (Start)
Sequence A075888 and the above sequence are fitting together.
First 2 entries of this sequence have to be taken out.
In some cases two three or more sequenced entries of this sequence have to be added together to get the next entry of A075888.
Example: Sequences begin with 1, 3, 2, 5, 3, 7, 4, 9 (4 + 9 = 13, the next entry in A075888).
But it works out well up to primes around 50000 (haven't tested higher ones).
As A075888 gives a very regular graph. There seems to be a regularity in the primes. (End)
Starting with 1 = triangle A115359 * [1, 2, 3, ...]. - Gary W. Adamson, Nov 27 2009
From Gary W. Adamson, Dec 11 2009: (Start)
Let M be an infinite lower triangular matrix with (1, 1, 1, 0, 0, 0, ...) in every column, shifted down twice. This sequence starting with 1 = M * (1, 2, 3, ...)
M =
1;
1, 0;
1, 1, 0;
0, 1, 0, 0;
0, 1, 1, 0, 0;
0, 0, 1, 0, 0, 0;
0, 0, 1, 1, 0, 0, 0;
...
A026741 = M * (1, 2, 3, ...); but A002487 = lim_{n->infinity} M^n, a left-shifted vector considered as a sequence. (End)
A particular case of sequence for which a(n+3) = (a(n+2) * a(n+1)+q)/a(n) for every n > n0. Here n0 = 1 and q = -1. - Richard Choulet, Mar 01 2010
For n >= 2, a(n+1) is the smallest m such that s_n(2*m*(n-1))/(n-1) is even, where s_b(c) is the sum of digits of c in base b. - Vladimir Shevelev, May 02 2011
A001477 and A005408 interleaved. - Omar E. Pol, Aug 22 2011
Numerator of n/((n-1)*(n-2)). - Michael B. Porter, Mar 18 2012
Number of odd terms of n-th row in the triangles A162610 and A209297. - Reinhard Zumkeller, Jan 19 2013
For n >= 3, a(n) is the periodic of integer of spiral length ratio of spiral that have (n-1) circle centers. See illustration in links. - Kival Ngaokrajang, Dec 28 2013
This is the sequence of Lehmer numbers u_n(sqrt(R), Q) with the parameters R = 4 and Q = 1. It is a strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n, m)) for all natural numbers n and m. Cf. A005013 and A108412. - Peter Bala, Apr 18 2014
The sequence of convergents of the 2-periodic continued fraction [0; 1, -4, 1, -4, ...] = 1/(1 - 1/(4 - 1/(1 - 1/(4 - ...)))) = 2 begins [0/1, 1/1, 4/3, 3/2, 8/5, 5/3, 12/7, ...]. The present sequence is the sequence of denominators; the sequence of numerators of the continued fraction convergents [0, 1, 4, 3, 8, 5, 12, ...] is A022998, also a strong divisibility sequence. - Peter Bala, May 19 2014
For n >= 3, (a(n-2)/a(n))*Pi = vertex angle of a regular n-gon. See illustration in links. - Kival Ngaokrajang, Jul 17 2014
For n > 1, the numerator of the harmonic mean of the first n triangular numbers. - Colin Barker, Nov 13 2014
The difference sequence is a permutation of the integers. - Clark Kimberling, Apr 19 2015
From Timothy Hopper, Feb 26 2017: (Start)
Given the function a(n, p) = n/p if n mod p = 0, else n, then a possible formula is: a(n, p) = n*(1 + (p-1)*((n^(p-1)) mod p))/p, p prime, (n^(p-1)) mod p = 1, n not divisible by p. (Fermat's Little Theorem). Examples: p = 2; a(n), p = 3; A051176(n), p = 5; A060791(n), p = 7; A106608(n).
Conjecture: lcm(n, p) = p*a(n, p), gcd(n, p) = n/a(n, p). (End)
Let r(n) = (a(n+1) + 1)/a(n+1) if n mod 2 = 1, a(n+1)/(a(n+1) + 2) otherwise; then lim_{k->oo} 2^(k+2) * Product_{n=0..k} r(n)^(k-n) = Pi. - Dimitris Valianatos, Mar 22 2021
Number of integers k from 1 to n such that gcd(n,k) is odd. - Amiram Eldar, May 18 2025

Examples

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

References

  • David Wells, Prime Numbers: The Most Mysterious Figures in Math. Hoboken, New Jersey: John Wiley & Sons (2005), p. 53.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, 2nd Ed. Penguin (1997), p. 79.

Crossrefs

Signed version is in A030640. Partial sums give A001318.
Cf. A051176, A060819, A060791, A060789 for n / gcd(n, k) with k = 3..6. See also A106608 thru A106612 (k = 7 thru 11), A051724 (k = 12), A106614 thru A106621 (k = 13 thru 20).
Cf. A013942.
Cf. A227042 (first column). Cf. A005013 and A108412.

Programs

  • Haskell
    import Data.List (transpose)
    a026741 n = a026741_list !! n
    a026741_list = concat $ transpose [[0..], [1,3..]]
    -- Reinhard Zumkeller, Dec 12 2011
    
  • Magma
    [2*n/(3+(-1)^n): n in [0..70]]; // Vincenzo Librandi, Aug 14 2011
    
  • Maple
    A026741 := proc(n) if type(n,'odd') then n; else n/2; end if; end proc: seq(A026741(n), n=0..76); # R. J. Mathar, Jan 22 2011
  • Mathematica
    Numerator[Abs[Table[Det[DiagonalMatrix[Table[1/i^2 - 1, {i, 1, n - 1}]] + 1], {n, 20}]]] (* Alexander Adamchuk, Jun 02 2006 *)
    halfMax = 40; Riffle[Range[0, halfMax], Range[1, 2halfMax + 1, 2]] (* Harvey P. Dale, Mar 27 2011 *)
    a[ n_] := Numerator[n / 2]; (* Michael Somos, Jan 20 2017 *)
    Array[If[EvenQ[#],#/2,#]&,80,0] (* Harvey P. Dale, Jul 08 2023 *)
  • PARI
    a(n) = numerator(n/2) \\ Rick L. Shepherd, Sep 12 2007
    
  • Python
    def A026741(n): return n if n % 2 else n//2 # Chai Wah Wu, Apr 02 2021
  • Sage
    [lcm(n, 2) / 2 for n in range(77)] # Zerinvary Lajos, Jun 07 2009
    

Formula

G.f.: x*(1 + x + x^2)/(1-x^2)^2. - Len Smiley, Apr 30 2001
a(n) = 2*a(n-2) - a*(n-4) for n >= 4.
a(n) = n * 2^((n mod 2) - 1). - Reinhard Zumkeller, Oct 16 2001
a(n) = 2*n/(3 + (-1)^n). - Benoit Cloitre, Mar 24 2002
Multiplicative with a(2^e) = 2^(e-1) and a(p^e) = p^e, p > 2. - Vladeta Jovovic, Apr 05 2002
a(n) = n / gcd(n, 2). a(n)/A045896(n) = n/((n+1)*(n+2)).
For n > 0, a(n) = denominator of Sum_{i=1..n-1} 2/(i*(i+1)), numerator=A022998. - Reinhard Zumkeller, Apr 21 2012, Jul 25 2002 [thanks to Phil Carmody who noticed an error]
For n > 1, a(n) = GCD of the n-th and (n-1)-th triangular numbers (A000217). - Ross La Haye, Sep 13 2003
Euler transform of finite sequence [1, 2, -1]. - Michael Somos, Jun 15 2005
G.f.: x * (1 - x^3) / ((1 - x) * (1 - x^2)^2) = Sum_{k>0} k * (x^k - x^(2*k)). - Michael Somos, Jun 15 2005
a(n+3) + a(n+2) = 3 + a(n+1) + a(n). a(n+3) * a(n) = - 1 + a(n+2) * a(n+1). a(n) = -a(-n) for all n in Z. - Michael Somos, Jun 15 2005
For n > 1, a(n) is the numerator of the average of 1, 2, ..., n - 1; i.e., numerator of A000217(n-1)/(n-1), with corresponding denominators [1, 2, 1, 2, ...] (A000034). - Rick L. Shepherd, Jun 05 2006
Equals A126988 * (1, -1, 0, 0, 0, ...). - Gary W. Adamson, Apr 17 2007
For n >= 1, a(n) = gcd(n,A000217(n)). - Rick L. Shepherd, Sep 12 2007
a(n) = numerator(n/(2*n-2)) for n >= 2; A022998(n-1) = denominator(n/(2*n-2)) for n >= 2. - Johannes W. Meijer, Jun 18 2009
a(n) = A167192(n+2, 2). - Reinhard Zumkeller, Oct 30 2009
a(n) = A106619(n) * A109012(n). - Paul Curtz, Apr 04 2011
From R. J. Mathar, Apr 18 2011: (Start)
a(n) = A109043(n)/2.
Dirichlet g.f.: zeta(s-1)*(1 - 1/2^s). (End)
a(n) = A001318(n) - A001318(n-1) for n > 0. - Jonathan Sondow, Jan 28 2013
a((2*n+1)*2^p - 1) = 2^p - 1 + n*A151821(p+1), p >= 0 and n >= 0. - Johannes W. Meijer, Feb 03 2013
a(n+1) = denominator(H(n, 1)), n >= 0, with H(n, 1) = 2*n/(n+1) the harmonic mean of n and 1. a(n+1) = A227042(n, 1). See the formula a(n) = n/gcd(n, 2) given above. - Wolfdieter Lang, Jul 04 2013
a(n) = numerator(n/2). - Wesley Ivan Hurt, Oct 02 2013
a(n) = numerator(1 - 2/(n+2)), n >= 0; a(n) = denominator(1 - 2/n), n >= 1. - Kival Ngaokrajang, Jul 17 2014
a(n) = Sum_{i = floor(n/2)..floor((n+1)/2)} i. - Wesley Ivan Hurt, Apr 27 2016
Euler transform of length 3 sequence [1, 2, -1]. - Michael Somos, Jan 20 2017
G.f.: x / (1 - x / (1 - 2*x / (1 + 7*x / (2 - 9*x / (7 - 4*x / (3 - 7*x / (2 + 3*x))))))). - Michael Somos, Jan 20 2017
From Peter Bala, Mar 24 2019: (Start)
a(n) = Sum_{d|n, n/d odd} phi(d), where phi(n) is the Euler totient function A000010.
O.g.f.: Sum_{n >= 1} phi(n)*x^n/(1 - x^(2*n)). (End)
a(n) = A256095(2*n,n). - Alois P. Heinz, Jan 21 2020
E.g.f.: x*(2*cosh(x) + sinh(x))/2. - Stefano Spezia, Apr 28 2023
From Ctibor O. Zizka, Oct 05 2023: (Start)
For k >= 0, a(k) = gcd(k + 1, k*(k + 1)/2).
If (k mod 4) = 0 or 2 then a(k) = (k + 1).
If (k mod 4) = 1 or 3 then a(k) = (k + 1)/2. (End)
Sum_{n=1..oo} 1/a(n)^2 = 7*Pi^2/24. - Stefano Spezia, Dec 02 2023
a(n)*a(n+1) = A000217(n). - Rémy Sigrist, Mar 19 2025

Extensions

Better description from Jud McCranie
Edited by Ralf Stephan, Jun 04 2003

A014682 The Collatz or 3x+1 function: a(n) = n/2 if n is even, otherwise (3n+1)/2.

Original entry on oeis.org

0, 2, 1, 5, 2, 8, 3, 11, 4, 14, 5, 17, 6, 20, 7, 23, 8, 26, 9, 29, 10, 32, 11, 35, 12, 38, 13, 41, 14, 44, 15, 47, 16, 50, 17, 53, 18, 56, 19, 59, 20, 62, 21, 65, 22, 68, 23, 71, 24, 74, 25, 77, 26, 80, 27, 83, 28, 86, 29, 89, 30, 92, 31, 95, 32, 98, 33, 101, 34, 104
Offset: 0

Keywords

Comments

This is the function usually denoted by T(n) in the literature on the 3x+1 problem. See A006370 for further references and links.
Intertwining of sequence A016789 '2,5,8,11,... ("add 3")' and the nonnegative integers.
a(n) = log_2(A076936(n)). - Amarnath Murthy, Oct 19 2002
The average value of a(0), ..., a(n-1) is A004526(n). - Amarnath Murthy, Oct 19 2002
Partial sums are A093353. - Paul Barry, Mar 31 2008
Absolute first differences are essentially in A014681 and A103889. - R. J. Mathar, Apr 05 2008
Only terms of A016789 occur twice, at positions given by sequences A005408 (odd numbers) and A016957 (6n+4): (1,4), (3,10), (5,16), (7,22), ... - Antti Karttunen, Jul 28 2017
a(n) represents the unique congruence class modulo 2n+1 that is represented an odd number of times in any 2n+1 consecutive oblong numbers (A002378). This property relates to Jim Singh's 2018 formula, as n^2 + n is a relevant oblong number. - Peter Munn, Jan 29 2022

Examples

			a(3) = -3*(-1) - 2*1 - 1*(-1) - 0*1 + 1*(-1) + 2*1 + 3*(-1) + 4*1 + 5*(-1) + 6*1 = 5. - _Bruno Berselli_, Dec 14 2015
		

References

  • J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010.

Programs

  • Haskell
    a014682 n = if r > 0 then div (3 * n + 1) 2 else n'
                where (n', r) = divMod n 2
    -- Reinhard Zumkeller, Oct 03 2014
    
  • Magma
    [IsOdd(n) select (3*n+1)/2 else n/2: n in [0..52]]; // Vincenzo Librandi, Sep 28 2018
  • Maple
    T:=proc(n) if n mod 2 = 0 then n/2 else (3*n+1)/2; fi; end; # N. J. A. Sloane, Jan 31 2011
    A076936 := proc(n) option remember ; local apr,ifr,me,i,a ; if n <=2 then n^2 ; else apr := mul(A076936(i),i=1..n-1) ; ifr := ifactors(apr)[2] ; me := -1 ; for i from 1 to nops(ifr) do me := max(me, op(2,op(i,ifr))) ; od ; me := me+ n-(me mod n) ; a := 1 ; for i from 1 to nops(ifr) do a := a*op(1,op(i,ifr))^(me-op(2,op(i,ifr))) ; od ; if a = A076936(n-1) then me := me+n ; a := 1 ; for i from 1 to nops(ifr) do a := a*op(1,op(i,ifr))^(me-op(2,op(i,ifr))) ; od ; fi ; RETURN(a) ; fi ; end: A014682 := proc(n) log[2](A076936(n)) ; end: for n from 1 to 85 do printf("%d, ",A014682(n)) ; od ; # R. J. Mathar, Mar 20 2007
  • Mathematica
    Collatz[n_?OddQ] := (3n + 1)/2; Collatz[n_?EvenQ] := n/2; Table[Collatz[n], {n, 0, 79}] (* Alonso del Arte, Apr 21 2011 *)
    LinearRecurrence[{0, 2, 0, -1}, {0, 2, 1, 5}, 70] (* Jean-François Alcover, Sep 23 2017 *)
    Table[If[OddQ[n], (3 n + 1) / 2, n / 2], {n, 0, 60}] (* Vincenzo Librandi, Sep 28 2018 *)
  • PARI
    a(n)=if(n%2,3*n+1,n)/2 \\ Charles R Greathouse IV, Sep 02 2015
    
  • PARI
    a(n)=if(n<2,2*n,(n^2-n-1)%(2*n+1)) \\ Jim Singh, Sep 28 2018
    
  • Python
    def a(n): return n//2 if n%2==0 else (3*n + 1)//2
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 29 2017
    

Formula

From Paul Barry, Mar 31 2008: (Start)
G.f.: x*(2 + x + x^2)/(1-x^2)^2.
a(n) = (4*n+1)/4 - (2*n+1)*(-1)^n/4. (End)
a(n) = -a(n-1) + a(n-2) + a(n-3) + 4. - John W. Layman
For n > 1 this is the image of n under the modified "3x+1" map (cf. A006370): n -> n/2 if n is even, n -> (3*n+1)/2 if n is odd. - Benoit Cloitre, May 12 2002
O.g.f.: x*(2+x+x^2)/((-1+x)^2*(1+x)^2). - R. J. Mathar, Apr 05 2008
a(n) = 5/4 + (1/2)*((-1)^n)*n + (3/4)*(-1)^n + n. - Alexander R. Povolotsky, Apr 05 2008
a(n) = Sum_{i=-n..2*n} i*(-1)^i. - Bruno Berselli, Dec 14 2015
a(n) = Sum_{k=0..n-1} Sum_{i=0..k} C(i,k) + (-1)^k. - Wesley Ivan Hurt, Sep 20 2017
a(n) = (n^2-n-1) mod (2*n+1) for n > 1. - Jim Singh, Sep 26 2018
The above formula can be rewritten to show a pattern: a(n) = (n*(n+1)) mod (n+(n+1)). - Peter Munn, Jan 29 2022
Binary: a(n) = (n shift left (n AND 1)) - (n shift right 1) = A109043(n) - A004526(n). - Rudi B. Stranden, Jun 15 2021
From Rudi B. Stranden, Mar 21 2022: (Start)
a(n) = A064455(n+1) - 1, relating the number ON cells in row n of cellular automaton rule 54.
a(n) = 2*n - A071045(n).
(End)
E.g.f.: (1 + x)*sinh(x)/2 + 3*x*cosh(x)/2 = ((4*x+1)*e^x + (2*x-1)*e^(-x))/4. - Rénald Simonetto, Oct 20 2022
a(n) = n*(n mod 2) + ceiling(n/2) = A193356(n) + A008619(n+1). - Jonathan Shadrach Gilbert, Mar 12 2023
a(n) = 2*a(n-2) - a(n-4) for n > 3. - Chai Wah Wu, Apr 17 2024

Extensions

Edited by N. J. A. Sloane, Apr 26 2008, at the suggestion of Artur Jasinski
Edited by N. J. A. Sloane, Jan 31 2011

A298036 Coordination sequence of Dual(4.6.12) tiling with respect to a 12-valent node.

Original entry on oeis.org

1, 12, 12, 36, 24, 60, 36, 84, 48, 108, 60, 132, 72, 156, 84, 180, 96, 204, 108, 228, 120, 252, 132, 276, 144, 300, 156, 324, 168, 348, 180, 372, 192, 396, 204, 420, 216, 444, 228, 468, 240, 492, 252, 516, 264, 540, 276, 564, 288, 588, 300
Offset: 0

Author

N. J. A. Sloane, Jan 22 2018

Keywords

Comments

Conjecture: For n>0, a(n)=6n if n even, otherwise 12n.
The conjecture can easily be shown to be true: The vertices at distance 2k consist of 3k 12-valent and 3k 4-alent vertices, and the vertices at distance 2k+1 consist of 6(k+1) 6-valent and 6(k+1) 4-valent vertices. - Charlie Neder, Apr 22 2019

Crossrefs

Cf. A072154, A298037 (partial sums), A298038 (hexavalent node), A298040 (tetravalent node).
Cf. A109043 (a(n)/6), A026741 (a(n)/12).
List of coordination sequences for Laves tilings (or duals of uniform planar nets): [3,3,3,3,3.3] = A008486; [3.3.3.3.6] = A298014, A298015, A298016; [3.3.3.4.4] = A298022, A298024; [3.3.4.3.4] = A008574, A296368; [3.6.3.6] = A298026, A298028; [3.4.6.4] = A298029, A298031, A298033; [3.12.12] = A019557, A298035; [4.4.4.4] = A008574; [4.6.12] = A298036, A298038, A298040; [4.8.8] = A022144, A234275; [6.6.6] = A008458.

Programs

  • Mathematica
    LinearRecurrence[{0, 2, 0, -1}, {1, 12, 12, 36, 24}, 100] (* Paolo Xausa, Jul 19 2024 *)

Formula

From Charlie Neder, Apr 22 2019: (Start)
a(n) = 6 * n * (1 + n mod 2), n > 0.
G.f.: (1 + 12*x + 10*x^2 + 12*x^3 + x^4)/(1 - x^2)^2. (End)

Extensions

a(7)-a(50) from Charlie Neder, Apr 22 2019

A036666 Numbers k such that 5*k + 1 is a square.

Original entry on oeis.org

0, 3, 7, 16, 24, 39, 51, 72, 88, 115, 135, 168, 192, 231, 259, 304, 336, 387, 423, 480, 520, 583, 627, 696, 744, 819, 871, 952, 1008, 1095, 1155, 1248, 1312, 1411, 1479, 1584, 1656, 1767, 1843, 1960, 2040, 2163, 2247, 2376, 2464, 2599, 2691
Offset: 1

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Third differences are 4, -6, 8, -10, 12, -14, 16, -18, 20, -22, 24, -26, 28, ...
X values of solutions to the equation 5*X^3 + X^2 = Y^2. - Mohamed Bouhamida, Nov 06 2007
Also, numbers 5*i^2 + 2*i for integer i. The characteristic function is A205633(n). - Jason Kimberley, Nov 15 2012
From Gary W. Adamson, Sep 22 2019: (Start)
Match the values a(n) with the squares 5k + 1 as follows:
3,....7,....16,....24,... .a, a, a, a,...
16,...36,....81,...121,... (base).
Then 1/5 in the matching base is equal to .a, a, a,...
Example: 1/5 in base 36 is equal to .7, 7, 7, 7...
Check: 7/36 + 7/36^2 = 259/1296 = .199845...; close to 1/5.
(End)

Programs

Formula

G.f.: x*(3 + 4*x + 3*x^2) / ((1 - x)*(1 - x^2)).
a(n) has the form ((5*m + 1)^2 - 1)/5 if n is odd; a(n) has the form ((5*m + 4)^2 - 1)/5 if n is even.
a(2*k) = k*(5*k + 2), a(2*k + 1) = 5*k^2 + 8*k + 3. - Mohamed Bouhamida, Nov 06 2007
a(n+1) = n^2 + n + ceiling(n/2)^2. - Gary Detlefs, Feb 23 2010
From Bruno Berselli, Nov 27 2010: (Start)
a(n) = (10*n*(n - 1)+(2*n - 1)*(-1)^n + 1)/8.
5*a(n) + 1 = A047209(n)^2. (End)
a(n) = Sum_{k=0..n} k + A109043(k). - Jon Maiga, Nov 28 2018
E.g.f.: (exp(x)*(1 + 10*x^2) - exp(-x)*(1 + 2*x))/8. - Franck Maminirina Ramaharo, Nov 29 2018
From Amiram Eldar, Mar 15 2022: (Start)
Sum_{n>=2} 1/a(n) = 5/4 - sqrt(1-2/sqrt(5))*Pi/2.
Sum_{n>=2} (-1)^n/a(n) = 5*(log(5)-1)/4 - sqrt(5)*log(phi)/2, where phi is the golden ratio (A001622). (End)

Extensions

Better description and additional formula from Santi Spadaro, Jul 12 2001

A051173 Triangle read by rows: T(n, k) = lcm(n, k).

Original entry on oeis.org

1, 2, 2, 3, 6, 3, 4, 4, 12, 4, 5, 10, 15, 20, 5, 6, 6, 6, 12, 30, 6, 7, 14, 21, 28, 35, 42, 7, 8, 8, 24, 8, 40, 24, 56, 8, 9, 18, 9, 36, 45, 18, 63, 72, 9, 10, 10, 30, 20, 10, 30, 70, 40, 90, 10, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 11, 12, 12, 12, 12, 60, 12, 84, 24, 36, 60, 132, 12
Offset: 1

Keywords

Examples

			Triangle begins (for the full array see A109042):
  [1]  1;
  [2]  2,  2;
  [3]  3,  6,  3;
  [4]  4,  4, 12,  4;
  [5]  5, 10, 15, 20,  5;
  [6]  6,  6,  6, 12, 30,  6;
  [7]  7, 14, 21, 28, 35, 42,  7;
  [8]  8,  8, 24,  8, 40, 24, 56,  8;
		

Crossrefs

Cf. A109043 (column 2), A051193 (row sums), A000384 (central terms).

Programs

  • Haskell
    a051173 = lcm
    a051173_row n = a051173_tabl !! (n-1)
    a051173_tabl = map (\x -> map (lcm x) [1..x]) [1..]
    -- Reinhard Zumkeller, Aug 13 2013, Jul 07 2013
    
  • Maple
    A051173 := proc(u,v) ilcm(u,v) ; end proc: # R. J. Mathar, Apr 07 2011
  • Mathematica
    Table[LCM[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 30 2018 *)
  • PARI
    T(n,k) = lcm(n,k);
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n,k), ", ")); print;) \\ Michel Marcus, Jul 10 2017

Formula

T(n, 1) = T(n, n) = n. T(n, 2) = A109043(n). - R. J. Mathar, Apr 07 2011
T(n, k) = A075362(n, k)/A050873(n, k), 1 <= k <= n. - Reinhard Zumkeller, Apr 25 2011
T(n, k) = A051537(n, k) * A050873(n, k). - Reinhard Zumkeller, Jul 07 2013

A064680 Halve every even number, double every odd number.

Original entry on oeis.org

0, 2, 1, 6, 2, 10, 3, 14, 4, 18, 5, 22, 6, 26, 7, 30, 8, 34, 9, 38, 10, 42, 11, 46, 12, 50, 13, 54, 14, 58, 15, 62, 16, 66, 17, 70, 18, 74, 19, 78, 20, 82, 21, 86, 22, 90, 23, 94, 24, 98, 25, 102, 26, 106, 27, 110, 28, 114, 29, 118, 30, 122, 31, 126, 32, 130, 33, 134, 34, 138, 35
Offset: 0

Author

Reinhard Zumkeller, Oct 16 2001

Keywords

Comments

a(a(m)) = m for all m with gcd(m, 4) <= 2.

Programs

  • Haskell
    a064680 n = a064680_list !! n
    a064680_list = zipWith ($) (cycle [(`div` 2), (* 2)]) [0..]
    -- Reinhard Zumkeller, Jul 25 2012
  • Magma
    [IsEven(n) select n/2 else 2*n: n in [0..70]]; // Bruno Berselli, Mar 09 2011
    
  • Maple
    A064680:=n->n*(5-3*(-1)^n)/4: seq(A064680(n), n=0..100); # Wesley Ivan Hurt, Jul 24 2016
  • Mathematica
    f[n_] := 2^(2 Mod[n, 2] - 1) n; Array[f, 70, 0] (* Or *)
    f[n_] := If[ OddQ@ n, 2 n, n/2]; Array[f, 71, 0] (* Or *)
    CoefficientList[ Series[x (2 + x + 2 x^2)/(1 - x^2)^2, {x, 0, 70}], x] (* Robert G. Wilson v *)
    LinearRecurrence[{0,2,0,-1},{0,2,1,6},80] (* Harvey P. Dale, Mar 31 2025 *)
  • PARI
    a(n) = if (n%2, 2*n, n/2); \\ Harry J. Smith, Sep 22 2009
    

Formula

a(n) = n * 2^(2 * (n mod 2) - 1).
G.f.: x*(2+x+2*x^2)/(1-x^2)^2.
a(n) = 2*a(n-2) - a(n-4) for n>3.
a(n)*a(n+3) = -2 + a(n+1)*a(n+2).
a(2*n) = A001477(n), a(1+2*n) = A016825(n). - Paul Curtz, Mar 09 2011
a(n) = n*(5-3*(-1)^n)/4. - Bruno Berselli, Mar 09 2011
a(n)= (period 4 sequence: repeat 2, 2, 1, 2) * (A060819(n)=0,1,1,3,1,5,...). - Paul Curtz, Mar 10 2011
E.g.f.: x*(sinh(x) + 4*cosh(x))/2. - Ilya Gutkovskiy, Jul 24 2016
a(n) = lcm(numerator(n/2), denominator(n/2)). - Wesley Ivan Hurt, Jul 24 2016
a(n) = A176447(n) + n. - Filip Zaludek, Dec 10 2016
From Amiram Eldar, Oct 07 2023: (Start)
a(n) = lcm(n,2) / gcd(n,2).
Sum_{k=1..n} a(k) ~ (5/8)*n^2. (End)

A152749 a(n) = (n+1)*(3*n+1)/4 for n odd, a(n) = n*(3*n+2)/4 for n even.

Original entry on oeis.org

0, 2, 4, 10, 14, 24, 30, 44, 52, 70, 80, 102, 114, 140, 154, 184, 200, 234, 252, 290, 310, 352, 374, 420, 444, 494, 520, 574, 602, 660, 690, 752, 784, 850, 884, 954, 990, 1064, 1102, 1180, 1220, 1302, 1344, 1430, 1474, 1564, 1610, 1704, 1752, 1850, 1900, 2002
Offset: 0

Author

Vincenzo Librandi, Dec 31 2009

Keywords

Comments

Interleaving of A049450 and A049451 (for n > 0).
Also, integer values of k*(k+1)/3. - Charles R Greathouse IV, Dec 11 2010
The nonzero coefficients of the expansion of f(a) = Product_{k>=1} (1-a^(2k)), see A194159, occur at the terms of the sequence given above, i.e., f(a) = 1 - a^2 - a^4 + a^10 + a^14 - a^24 - a^30 + a^44 + a^52 - a^70 - a^80 + ... = Sum_{n>=0} (-1)^binomial(n+1,2)*a^A152749(n). - Johannes W. Meijer, Aug 21 2011
Partial sums of A109043. - Reinhard Zumkeller, Mar 31 2012
Nonnegative k such that 12*k+1 is a square. - Vicente Izquierdo Gomez, Jul 22 2013
Equivalently, numbers of the form h*(3*h+1), where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ... (see also the fifth comment of A062717). - Bruno Berselli, Feb 02 2017
For n > 0, a(n-1) is the sum of the largest parts of the partitions of 2n into two even parts. - Wesley Ivan Hurt, Dec 19 2017
The sequence terms occur as exponents in the expansion of Sum_{n >= 0} q^(n*(n+1)/2) * Product_{k >= n+1} 1 - q^k = 1 - q^2 - q^4 + q^10 + q^14 - q^24 - q^30 + + - - .... - Peter Bala, Dec 15 2024
Sequence terms occur as exponents in the expansions of Sum_{n >= 0} q^(n*(2*n+1)) * Product_{k >= 2*n+2} 1 - q^k = Sum_{n >= 0} q^(n*(2*n-1)) * Product_{k >= 2*n+1} 1 - q^k = 1 - q^2 - q^4 + q^10 + q^14 - q^24 - q^30 + + - - .... - Peter Bala, Jun 23 2025

Crossrefs

Cf. A049450 (n*(3*n-1)), A049451 (n*(3*n+1)), A153383 (12n+1 is not prime).

Programs

  • Haskell
    a152749 n = a152749_list !! (n-1)
    a152749_list = scanl1 (+) a109043_list
    -- Reinhard Zumkeller, Mar 31 2012
  • Magma
    [IsOdd(n) select (n+1)*(3*n+1)/4 else n*(3*n+2)/4: n in [0..52]];
    
  • Magma
    f:=func; [0] cat [f(n*m): m in [-1,1], n in [1..30]]; // Bruno Berselli, Nov 13 2012
    
  • Maple
    A152749 := proc(n): if type(n,even) then n*(3*n+2)/4  else (n+1)*(3*n+1)/4 fi: end: seq(A152749(n), n=0..51); # Johannes W. Meijer, Aug 21 2011
  • Mathematica
    Table[If[OddQ[n],(n+1)*(3*n+1)/4,n*(3*n+2)/4],{n,0,60}] (* Vladimir Joseph Stephan Orlovsky, Feb 03 2012 *)
    LinearRecurrence[{1,2,-2,-1,1}, {0, 2, 4, 10, 14}, 50] (* Vincenzo Librandi, Feb 22 2012 *)
    Select[Range[1,1000], IntegerQ[Sqrt[12#+1]]&] (* Vicente Izquierdo Gomez, Jul 22 2013 *)

Formula

From R. J. Mathar, Jan 03-06 2009: (Start)
G.f.: 2*x*(1+x+x^2)/((1+x)^2*(1-x)^3).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) = A003154(n+1)/8 - (-1)^n*A005408(n)/8.
a(n) = 2*A001318(n) = ((6*n^2+6*n+1) - (2*n+1)*(-1)^n)/8. (End)
From Amiram Eldar, Mar 15 2022: (Start)
Sum_{n>=1} 1/a(n) = 3 - Pi/sqrt(3).
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*(log(3)-1). (End)

Extensions

Edited, typo corrected and extended by Klaus Brockhaus, Jan 02 2009
Leading term a(0)=0 added by Johannes W. Meijer, Aug 21 2011

A109042 Square array read by antidiagonals: A(n, k) = lcm(n, k) for n >= 0, k >= 0.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 2, 3, 0, 0, 4, 6, 6, 4, 0, 0, 5, 4, 3, 4, 5, 0, 0, 6, 10, 12, 12, 10, 6, 0, 0, 7, 6, 15, 4, 15, 6, 7, 0, 0, 8, 14, 6, 20, 20, 6, 14, 8, 0, 0, 9, 8, 21, 12, 5, 12, 21, 8, 9, 0, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 0, 11, 10, 9, 8, 35, 6, 35, 8, 9, 10, 11, 0
Offset: 0

Author

Mitch Harris, Jun 18 2005

Keywords

Examples

			Seen as an array:
  [0] 0, 0,  0,  0,  0,  0,  0,  0,  0,  0, ...
  [1] 0, 1,  2,  3,  4,  5,  6,  7,  8,  9, ...
  [2] 0, 2,  2,  6,  4, 10,  6, 14,  8, 18, ...
  [3] 0, 3,  6,  3, 12, 15,  6, 21, 24,  9, ...
  [4] 0, 4,  4, 12,  4, 20, 12, 28,  8, 36, ...
  [5] 0, 5, 10, 15, 20,  5, 30, 35, 40, 45, ...
  [6] 0, 6,  6,  6, 12, 30,  6, 42, 24, 18, ...
  [7] 0, 7, 14, 21, 28, 35, 42,  7, 56, 63, ...
  [8] 0, 8,  8, 24,  8, 40, 24, 56,  8, 72, ...
  [9] 0, 9, 18,  9, 36, 45, 18, 63, 72,  9, ...
.
Seen as a triangle T(n, k) = lcm(n - k, k).
  [0] 0;
  [1] 0, 0;
  [2] 0, 1,  0;
  [3] 0, 2,  2,  0;
  [4] 0, 3,  2,  3,  0;
  [5] 0, 4,  6,  6,  4,  0;
  [6] 0, 5,  4,  3,  4,  5, 0;
  [7] 0, 6, 10, 12, 12, 10, 6,  0;
  [8] 0, 7,  6, 15,  4, 15, 6,  7, 0;
  [9] 0, 8, 14,  6, 20, 20, 6, 14, 8, 0;
		

Crossrefs

Rows A000027, A109043, A109044, A109045, A109046, A109047, A109048, A109049, A109050, A109051, A109052, A109053, A006580 (row sums of triangle), A001477 (main diagonal, central terms).
Variants: A003990 is (1, 1) based, A051173 (T(n,k) = lcm(n,k)).

Programs

  • Maple
    T := (n, k) -> ilcm(n - k, k):
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;  # Peter Luschny, Mar 24 2025

Formula

lcm(n, k) = n*k / gcd(n, k) for (n, k) != (0, 0).
Showing 1-10 of 20 results. Next