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

A258252 Sequence of distinct positive integers having lowest possible denominators of sums of 1/a(n).

Original entry on oeis.org

1, 2, 6, 3, 4, 12, 15, 10, 14, 35, 5, 30, 42, 7, 8, 24, 18, 9, 33, 88, 40, 60, 84, 63, 99, 22, 26, 143, 11, 154, 238, 51, 21, 28, 20, 55, 66, 78, 91, 56, 72, 90, 110, 132, 156, 13
Offset: 1

Views

Author

Ivan Neretin, May 24 2015

Keywords

Comments

a(n) is chosen among the unused positive integers so that the denominator of Sum_{i=1..n} 1/a(i), is as low as possible.
Presumably a permutation of positive integers.
Primes do not always occur in natural order.
The numbers which retain their natural positions (that is, a(n)=n) are 1, 2, 48, 80601...
Inverse (A258253): 1, 2, 4, 5, 11, 3, 14, 15, 18, 8, 29, 6, 46, 9, 7, 47, 73, 17, 134, 35, 33, 26, 153, 16, 96, ..., . - Robert G. Wilson v, Jun 18 2015
Records: 1, 2, 6, 12, 15, 35, 42, 88, 99, 143, 154, 238, 260, 460, 544, 840, 1645, 1666, 2109, 2622, 3876, 4599, 5644, 6565, 6734, 8701, 9492, 10272, ..., . - Robert G. Wilson v, Jun 18 2015

Examples

			After 2 terms, the partial sum of 1/a(i) reaches 3/2. Adding 1 or 1/2 is impossible, since 1 and 2 are already taken. The rest of positive integers lead to the following sums: +1/3 -> 11/6, +1/4 -> 7/4, +1/5 -> 17/10, +1/6 -> 5/3 with denominator 3 which is the lowest we can get. Hence a(3)=6.
For this specific term, the fractions that are encountered are 3/2 + 1/k with k>2. The resulting sequence of denominators are: 6, 4, 10, 3, 14, 8, 18, 5, 22, 12, ... (see A145979) within which the smallest term is indeed 3. - _Michel Marcus_, Jun 04 2015
		

Crossrefs

Cf. A157248 (another reordering of the harmonic series), A258253 (putative inverse), A258254 (denominators of partial sums of 1/a(n)), A258255 (positions where partial sums reach integers).

Programs

  • Mathematica
    f[lst_] := Block[{c = 0, d, dk, k, mk, mn = Infinity, t = Total[1/lst]}, d = Denominator@ t; k = d; While[c < 101, If[ !MemberQ[lst, k], c++; dk = Denominator[t + 1/k]; If[dk < mn, mn = dk; mk = k]]; k += d]; Append[lst, mk]]; Nest[f, {}, 60] (* Robert G. Wilson v, Jun 18 2015 *)

A140777 a(n) = 2*prime(n) - 4.

Original entry on oeis.org

0, 2, 6, 10, 18, 22, 30, 34, 42, 54, 58, 70, 78, 82, 90, 102, 114, 118, 130, 138, 142, 154, 162, 174, 190, 198, 202, 210, 214, 222, 250, 258, 270, 274, 294, 298, 310, 322, 330, 342, 354, 358, 378, 382, 390, 394, 418, 442, 450, 454, 462, 474, 478, 498, 510, 522
Offset: 1

Views

Author

Leroy Quet, May 29 2008, May 31 2008

Keywords

Comments

A number n is included if (p + n/p) is prime, where p is the smallest prime that divides n. Since all terms of this sequence are even (or otherwise p + n/p would be even and not a prime), p is always 2. So this sequence is the set of all even numbers n where (2 + n/2) is prime.
The entries are also encountered via the bilinear transform approximation to the natural log (unit circle). Specifically, evaluating 2(x-1)/(x+1) at x = 2, 3, 4, ..., the terms of this sequence are seen ahead of each new prime encountered. Additionally, the position of those same primes will occur at the entry positions. For clarity, the evaluation output is 2, 3, 1, 1, 6, 5, 4, 3, 10, 7, 3, 2, 14, 9, 8, 5, 18, 11, ..., where the entries ahead of each new prime are 2, 6, 10, 18, ... . As an aside, the same mechanism links this sequence to A165355. - Bill McEachen, Jan 08 2015
As a follow-up to previous comment, it appears that the numerators and denominators of 2(x-1)/(x+1) are respectively given by A145979 and A060819, but with different offsets. - Michel Marcus, Jan 14 2015
Subset of the union of A017641 & A017593. - Michel Marcus, Sep 01 2020

Examples

			The smallest prime dividing 42 is 2. Since 2 + 42/2 = 23 is prime, 42 is included in this sequence.
		

Crossrefs

Programs

  • Magma
    [2*NthPrime(n)-4: n in [1..80]]; // Vincenzo Librandi, Feb 19 2015
  • Maple
    A020639 := proc(n) local dvs,p ; dvs := sort(convert(numtheory[divisors](n),list)) ; for p in dvs do if isprime(p) then RETURN(p) ; fi ; od: error("%d",n) ; end: A111234 := proc(n) local p ; p := A020639(n) ; p+n/p ; end: isA140777 := proc(n) RETURN(isprime(A111234(n))) ; end: for n from 2 to 1200 do if isA140777(n) then printf("%d,",n) ; fi ; od: # R. J. Mathar, May 31 2008
    seq(2*ithprime(i)-4, i=1..1000); # Robert Israel, Jan 09 2015
  • Mathematica
    fQ[n_] := Block[{p = First@ First@ Transpose@ FactorInteger@ n}, PrimeQ[p + n/p] == True]; Select[ Range[2, 533], fQ@# &] (* Robert G. Wilson v, May 30 2008 *)
    Table[2 Prime[n] - 4, {n, 60}] (* Vincenzo Librandi, Feb 19 2015 *)
  • PARI
    vector(100, n, 2*prime(n) - 4) \\ Michel Marcus, Jan 09 2015
    

Formula

a(n) = 2*A040976(n). - Michel Marcus, Jan 09 2015

Extensions

More terms from Robert G. Wilson v and R. J. Mathar, May 30 2008

A191567 Four interlaced 2nd order polynomials: a(4*k) = k*(1+2*k); a(1+2*k) = 2*(1+2*k)*(3+2*k); a(2+4*k) = 4*(1+k)*(1+2*k).

Original entry on oeis.org

0, 6, 4, 30, 3, 70, 24, 126, 10, 198, 60, 286, 21, 390, 112, 510, 36, 646, 180, 798, 55, 966, 264, 1150, 78, 1350, 364, 1566, 105, 1798, 480, 2046, 136, 2310, 612, 2590, 171, 2886, 760, 3198, 210, 3526, 924, 3870, 253, 4230, 1104, 4606, 300, 4998, 1300, 5406, 351
Offset: 0

Views

Author

Paul Curtz, Jun 12 2011

Keywords

Comments

a(n) = T(0,n) and differences T(n,k) = T(n-1,k+1) - T(n-1,k) define the array
0, 6, 4, 30, 3, 70, 24, 126, 10, 198, 60, 286, 21, 390, ..
6, -2, 26, -27, 67, -46, 102, -116, 188, -138, 226, -265, 369, -278, ..
-8, 28 -53, 94, -113, 148, -218, 304, -326, 364, -491, 634, -647, 676, ...
T(3,n) mod 9 is the sequence 1, 1, 1, 4, 4, 4, 7, 7, 7, 4, 4, 4 (and periodically repeated with period 12).
A064680(2+n) divides a(n), where b(n) = a(n)/A064680(2+n) = 0, 1, 2, 3, 1, 5, 6, 7, 2,... for n>=0, obeys b(4*k) = k and has recurrence b(n) = 2*b(n-4) - b(n-8).

Crossrefs

Programs

  • GAP
    a:=[0,6,4,30,3,70,24,126,10,198,60,286];; for n in [13..60] do a[n]:= 3*a[n-4]-3*a[n-8]+a[n-12]; od; a; # G. C. Greubel, Feb 26 2019
  • Magma
    I:=[0,6,4,30,3,70,24,126,10,198,60,286]; [n le 12 select I[n] else 3*Self(n-4)-3*Self(n-8)+Self(n-12): n in [1..60]]; // Vincenzo Librandi, Apr 23 2017
    
  • Mathematica
    Table[Which[OddQ@ n, 2 (1 + 2 #) (3 + 2 #) &[(n - 1)/2], Mod[n, 4] == 0, # (1 + 2 #) &[n/4], True, 4 (1 + #) (1 + 2 #) &[(n - 2)/4]], {n, 0, 60}] (* or *)
    CoefficientList[Series[x(6 +4x +30x^2 +3x^3 +52x^4 +12x^5 +36x^6 +x^7 +6x^8 -2x^10)/((1-x)^3*(1+x)^3*(1+x^2)^3), {x, 0, 60}], x] (* Michael De Vlieger, Apr 22 2017 *)
    LinearRecurrence[{0,0,0,3,0,0,0,-3,0,0,0,1}, {0,6,4,30,3,70,24,126,10,198,60, 286}, 80] (* Vincenzo Librandi, Apr 23 2017 *)
  • PARI
    m=60; v=concat([0,6,4,30,3,70,24,126,10,198,60,286], vector(m-12)); for(n=13, m, v[n]=3*v[n-4]-3*v[n-8]+v[n-12]); v \\ G. C. Greubel, Feb 26 2019
    
  • Sage
    (x*(6+4*x+30*x^2+3*x^3+52*x^4+12*x^5+36*x^6+x^7+6*x^8-2*x^10)/((1-x)^3 *(1+x)^3*(1+x^2)^3 )).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Feb 26 2019
    

Formula

a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12).
a(n) = A061037(n+2) + A181318(n). - Paul Curtz, Jul 19 2011
a(n) = A060819(n) * A145979(n). - Paul Curtz, Sep 06 2011
G.f.: x*(6+4*x+30*x^2+3*x^3+52*x^4+12*x^5+36*x^6+x^7+6*x^8-2*x^10) /( (1-x)^3 *(1+x)^3 *(1+x^2)^3 ). - R. J. Mathar, Jun 17 2011
Let BEB(n) = a(n)/A061038(n+2) = A060819(n)/A145979(n). Then (BEB(n))^2 = A181318(n)/A061038(n+2) = BEB(n) - A061037(n+2)/A061038(n+2). - Paul Curtz, Jul 19 2011, index corrected by R. J. Mathar, Sep 09 2011
From Luce ETIENNE, Apr 18 2017: (Start)
a(n) = n*(n + 2)*(37 - 27*(-1)^n - 3*((-1)^((2*n + 1 - (-1)^n)/4) + (-1)^((2*n - 1 + (-1)^n)/4)))/32.
a(n) = n*(n+2)*(37-27*cos(n*Pi) - 6*cos(n*Pi/2))/32.
a(n) = n*(n + 2)*(37 - 27*(-1)^n - 3*(i^n + (-i)^n))/32, where i=sqrt(-1). (End)

A221920 a(n) = 3*n/gcd(3*n, n+3), n >= 3.

Original entry on oeis.org

3, 12, 15, 2, 21, 24, 9, 30, 33, 12, 39, 42, 5, 48, 51, 18, 57, 60, 21, 66, 69, 8, 75, 78, 27, 84, 87, 30, 93, 96, 11, 102, 105, 36, 111, 114, 39, 120, 123, 14, 129, 132, 45, 138, 141, 48, 147, 150, 17, 156, 159, 54, 165, 168, 57, 174, 177, 20, 183, 186, 63
Offset: 3

Views

Author

Wolfdieter Lang, Feb 21 2013

Keywords

Comments

This is the third column sequence (m = 3) of the triangle A221918.

Examples

			a(6) = numerator(18/9) = numerator(2) = 2 = 18/gcd(18,9) = 18/9 = 18/gcd(9,9) = 18/9.
		

Crossrefs

Cf. A221918, A000027 (m=1), A145979(m=2), A221921 (m=4), A222463 (m=5).

Programs

Formula

a(n) = A221918(n,3) = numerator(n*3/(n+3)), n >= 3.
a(n) = 3*n/gcd(3*n,n+3), n >= 3.
a(n) = 3*n/gcd(9,n+3), n >= 3, (because gcd(n+3,3*n) = gcd(n+3,3*n - 3*(n+3)) = gcd(n+3,-3^2) = gcd(n+3,9)).
G.f.: -x^3*(6*x^17 + 3*x^16 - 3*x^14 - 6*x^13 - x^12 - 12*x^11 - 15*x^10 - 6*x^9 - 33*x^8 - 30*x^7 - 9*x^6 - 24*x^5 - 21*x^4 - 2*x^3 - 15*x^2 - 12*x - 3) / ((x-1)^2*(x^2 + x + 1)^2*(x^6 + x^3 + 1)^2). - Colin Barker, Feb 25 2013
Sum_{k=3..n} a(k) ~ (61/54) * n^2. - Amiram Eldar, Oct 09 2023

A221921 a(n) = 4*n/gcd(4*n,n+4), n >= 4.

Original entry on oeis.org

2, 20, 12, 28, 8, 36, 20, 44, 3, 52, 28, 60, 16, 68, 36, 76, 10, 84, 44, 92, 24, 100, 52, 108, 7, 116, 60, 124, 32, 132, 68, 140, 18, 148, 76, 156, 40, 164, 84, 172, 11, 180, 92, 188, 48, 196, 100, 204, 26, 212, 108, 220, 56, 228, 116, 236, 15, 244, 124, 252, 64
Offset: 4

Views

Author

Wolfdieter Lang, Feb 21 2013

Keywords

Comments

This is the fourth column of the triangle A221918.

Examples

			a(8) = numerator(32/12) = numerator(8/3) = 8 = 32/gcd(32,12) = 32/4 = 32/gcd(16,12).
		

Crossrefs

Cf. A221918, A000027 (m=1), A145979(m=2), A221920 (m=3).

Programs

Formula

a(n) = A221918(n,4) = numerator(n*4/(n+4)), n >= 4.
a(n) = 4*n/gcd(16,n+4), n >= 4.
G.f.: x^4*(-12*x^31 - 4*x^30 - 4*x^29 + 4*x^27 + 4*x^26 + 12*x^25 + x^24 + 20*x^23 + 12*x^22 + 28*x^21 + 8*x^20 + 36*x^19 + 20*x^18 + 44*x^17 + 6*x^16 + 76*x^15 + 36*x^14 + 68*x^13 + 16*x^12 + 60*x^11 + 28*x^10 + 52*x^9 + 3*x^8 + 44*x^7 + 20*x^6 + 36*x^5 + 8*x^4 + 28*x^3 + 12*x^2 + 20*x + 2) / (x^32 - 2*x^16 + 1). - Colin Barker, Feb 25 2013
Sum_{k=4..n} a(k) ~ (171/128) * n^2. - Amiram Eldar, Oct 09 2023

A222463 a(n) = n*5/gcd(n*5,n+5), n >= 5.

Original entry on oeis.org

5, 30, 35, 40, 45, 10, 55, 60, 65, 70, 15, 80, 85, 90, 95, 4, 105, 110, 115, 120, 25, 130, 135, 140, 145, 30, 155, 160, 165, 170, 35, 180, 185, 190, 195, 40, 205, 210, 215, 220, 9, 230, 235, 240, 245, 50, 255, 260, 265, 270, 55, 280, 285, 290, 295, 60
Offset: 5

Views

Author

Wolfdieter Lang, Feb 21 2013

Keywords

Comments

This is the fifth column (m=5) of the triangle A221918.

Examples

			a(10) = numerator(50/15) = numerator(10/3) = 10 = 50/gcd(50,15)= 50/5 = 50/gcd(25,15).
		

Crossrefs

Cf. A221918, A000027 (m=1), A145979(m=2), A221920 (m=3), A221921 (m=4).

Programs

  • Mathematica
    Table[(5n)/GCD[5n,n +5],{n,5,60}] (* Harvey P. Dale, Nov 06 2020 *)

Formula

a(n) = A221918(n,5) = numerator(n*5/(n+5)) = n*5/gcd(n*5,n+5) = n*5/gcd(25,n+5), n >= 5.
a(n) = 2*a(n-25)-a(n-50). - Colin Barker, Feb 25 2013
Sum_{k=5..n} a(k) ~ (521/250) * n^2. - Amiram Eldar, Oct 09 2023

A246943 a(4n) = 4*n , a(2n+1) = 8*n+4 , a(4n+2) = 2*n+1.

Original entry on oeis.org

0, 4, 1, 12, 4, 20, 3, 28, 8, 36, 5, 44, 12, 52, 7, 60, 16, 68, 9, 76, 20, 84, 11, 92, 24, 100, 13, 108, 28, 116, 15, 124, 32, 132, 17, 140, 36, 148, 19, 156, 40, 164, 21, 172, 44, 180, 23, 188, 48, 196, 25, 204, 52, 212, 27, 220, 56, 228
Offset: 0

Views

Author

Paul Curtz, Sep 08 2014

Keywords

Comments

Consider the denominators of the Balmer series A061038(n) = 0, 4, 1, 36, 16, 100,... (a permutation of the squares of the nonnegative numbers i.e. A000290(n)) divided by A028310(n)=1,1,2,... . The numerators are a(n). The denominators are A138191(n).
Note that A061038(3n)=9*A061038(n), n>=1.
a(3n) is divisible by the period 3 sequence: repeat 9, 3, 3.

Examples

			Numerators of a(0)=0/1=0, a(1)=4/1=4, a(2)=1/2, a(3)=36/3=12,... .
		

Crossrefs

Programs

  • Maple
    A246943:=n->n*(19-(-1)^n*13+2*cos(n*Pi/2))/8: seq(A246943(n), n=0..100); # Wesley Ivan Hurt, Apr 18 2017
  • Mathematica
    LinearRecurrence[{0,0,0,2,0,0,0,-1},{0,4,1,12,4,20,3,28},60] (* Harvey P. Dale, Jun 22 2022 *)
  • PARI
    concat(0, Vec(x*(4*x^6+x^5+12*x^4+4*x^3+12*x^2+x+4)/((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100))) \\ Colin Barker, Sep 08 2014

Formula

Numerators of A061038(n)/A028310(n).
a(2n) = A022998(n).
G.f.: x*(4*x^6+x^5+12*x^4+4*x^3+12*x^2+x+4) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Sep 08 2014
a(n) = n*(19-13*(-1)^n+(1+(-1)^n)*(-1)^((2*n-1+(-1)^n)/4))/8. - Luce ETIENNE, May 26 2015
a(n) = n*(19-(-1)^n*13+2*cos(n*Pi/2))/8. - Giovanni Resta, May 26 2015

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

A216972 a(4n+2) = 2, otherwise a(n) = n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 2, 7, 8, 9, 2, 11, 12, 13, 2, 15, 16, 17, 2, 19, 20, 21, 2, 23, 24, 25, 2, 27, 28, 29, 2, 31, 32, 33, 2, 35, 36, 37, 2, 39, 40, 41, 2, 43, 44, 45, 2, 47, 48, 49, 2, 51, 52, 53, 2, 55, 56, 57, 2, 59, 60, 61, 2, 63, 64, 65, 2, 67, 68, 69, 2
Offset: 0

Views

Author

Paul Curtz, Sep 21 2012

Keywords

Comments

For n>0, a(n) is the denominator of A214282(n)/(-A214283(n+1)):
1/1, 1/2, 1/3, 3/4, 3/5, 1/2, 3/7, 5/8, 5/9, ...
For n>0, a(n) is the denominator of A214283(n)/A214283(n+1):
0/1, 1/2, 2/3, 3/4, 2/5, 1/2, 4/7, 5/8, 4/9, ...
a(n), first and second differences:
0, 1, 2, 3, 4, 5, 2, 7, 8, 9, 2, 11, 12, ...
1, 1, 1, 1, 1, -3, 5, 1, 1, -7, 9, 1, 1, ...
0, 0, 0, 0, -4, 8, -4, 0, -8, 16, -8, 0, -12, ...

Crossrefs

Programs

  • Magma
    [n mod 4 eq 2 select 2 else n: n in [0..70]]; // Bruno Berselli, Sep 26 2012
    
  • Mathematica
    a[n_] := If[Mod[n, 4] == 2, 2, n]; Table[a[n], {n, 0, 81}] (* Jean-François Alcover, Sep 25 2012 *)
    LinearRecurrence[{0,0,0,2,0,0,0,-1},{0,1,2,3,4,5,2,7},80] (* Harvey P. Dale, Nov 06 2017 *)
  • Maxima
    makelist(expand(2+(4-(1+(-1)^n)*(1-%i^n))*(n-2)/4), n, 0, 70); /* Bruno Berselli, Sep 26 2012 */
    
  • Python
    def A216972(n): return 2 if n&3==2 else n # Chai Wah Wu, Jan 31 2024

Formula

a(n) = 2*a(n-4) - a(n-8).
a(n+4) - a(n) = 4*A152822(n).
a(2n) + a(2n+1) = |A141124(n)|.
a(4n) + a(4n+1) + a(4n+2) + a(4n+3) = 6*A005408(n) = A017593(n).
G.f.: (x+2*x^2+3*x^3+4*x^4+3*x^5-2*x^6+x^7) / (1-2*x^4+x^8). - Jean-François Alcover, Sep 25 2012
a(n) = 2+(4-(1+(-1)^n)*(1-i^n))*(n-2)/4, where i=sqrt(-1). - Bruno Berselli, Sep 26 2012
a(2n) = 2*|A009531(n)|, a(2n+1) = 2n+1. - Bruno Berselli, Sep 27 2012

A225058 a(4*n) = n-1. a(2*n+1) = a(4*n+2) = 2*n+1.

Original entry on oeis.org

-1, 1, 1, 3, 0, 5, 3, 7, 1, 9, 5, 11, 2, 13, 7, 15, 3, 17, 9, 19, 4, 21, 11, 23, 5, 25, 13, 27, 6, 29, 15, 31, 7, 33, 17, 35, 8, 37, 19, 39, 9, 41, 21, 43, 10, 45, 23, 47, 11, 49, 25, 51, 12, 53, 27, 55, 13, 57, 29, 59, 14, 61, 31, 63, 15, 65, 33, 67, 16, 69
Offset: 0

Views

Author

Paul Curtz, Apr 26 2013

Keywords

Comments

Consider the family of sequences with recurrence a(n) = 2*a(n-4)-a(n-8) where a(0) and a(4) move up in steps of 1. This here is characterized by a(0)=-1, a(4)=0:
-2, 1, 1, 3, -1, 5, 3, 7, 0, 9, 5, 11,...
-1, 1, 1, 3, 0, 5, 3, 7, 1, 9, 5, 11,... = a(n)
0, 1, 1, 3, 1, 5, 3, 7, 2, 9, 5, 11,... = A060819
1, 1, 1, 3, 2, 5, 3, 7, 3, 9, 5, 11,... = b(n)
2, 1, 1, 3, 3, 5, 3, 7, 4, 9, 5, 11,... .
a(n+4)+b(n) = A145979(n).
a(n+4)*b(n) = A061037(n+2).
a(n+4)-b(n) = repeat -1, 4, 2, 4 with period of length 4.

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2))); // G. C. Greubel, Sep 20 2018
  • Mathematica
    a[n_] := 1/16*(11*n-(-1)^n*(5*n+4)-2*(n+4)*Re[I^n]-4); Table[a[n], {n, 0, 47}] (* Jean-François Alcover, Apr 30 2013 *)
    LinearRecurrence[{0,0,0,2,0,0,0,-1},{-1,1,1,3,0,5,3,7},80] (* Harvey P. Dale, Jul 14 2019 *)
  • PARI
    x='x+O('x^50); Vec((-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2)) \\ G. C. Greubel, Sep 20 2018
    

Formula

a(n) = 2*a(n-4) - a(n-8).
a(n+4) - a(n) = A176895(n).
G.f.: (-1+x+x^2+3*x^3+3*x^5+x^6+x^7+2*x^4)/((-1+x)^2*(1+x)^2*(x^2+1)^2). - R. J. Mathar, Apr 28 2013
Previous Showing 11-20 of 22 results. Next