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-2 of 2 results.

A130824 a(n) = 2*A004273(n).

Original entry on oeis.org

0, 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230
Offset: 0

Views

Author

Paul Curtz, Jul 17 2007

Keywords

Comments

Equals A111284 from the 2nd term on. - R. J. Mathar, Jun 13 2008
Besides the first term, this sequence gives the denominators of the alternating series Pi/8 = 1/2 - 1/6 + 1/10 - 1/14 + 1/18 - 1/22 + .... - Mohammad K. Azarian, Oct 14 2011 [edited by Jon E. Schoenfield, Mar 07 2015]
Numbers that cannot be a side of a primitive Pythagorean triangle. - Torlach Rush, Nov 07 2019
Simple continued fraction expansion of tanh(1/2) = (e - 1)/(e + 1) = 1/(2 + 1/(6 + 1/(10 + 1/(14 + ...)))). - Peter Bala, Oct 01 2023

References

  • Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968).

Crossrefs

Programs

  • GAP
    Concatenation([0], List([1..60], n-> 4*n-2 )); # G. C. Greubel, Dec 30 2019
  • Magma
    [4*n-2*Floor((n+2) mod (n+1)):n in [0..60]]; // Vincenzo Librandi, Sep 22 2011
    
  • Maple
    A130827 := proc(n) if n =0 then 0 ; else 4*n-2 ; fi ; end: seq(A130827(n),n=0..120) ; # R. J. Mathar, Oct 28 2007
  • Mathematica
    2 Join[{0}, Range[1, 200, 2]] (* Michael De Vlieger, Mar 07 2015 *)
  • PARI
    vector(61, n, if(n==1, 0, 4*(n-1) -2) ) \\ G. C. Greubel, Dec 30 2019
    
  • Sage
    [0]+[4*n-2 for n in (1..60)] # G. C. Greubel, Dec 30 2019
    

Formula

From Stefano Spezia, Dec 09 2019: (Start)
G.f.: 2*x*(1+x)/(1-x)^2.
a(n) = 2*a(n-1) - a(n-2) for n > 0.
a(n) = 4*n - 1 - (-1)^(2^n). (End)
E.g.f: 2*(1 - (1-2*x)*exp(x)). - G. C. Greubel, Dec 30 2019

Extensions

More terms from R. J. Mathar, Oct 28 2007

A361803 Least k > 1 such that k^n - n > 1 is semiprime, or 0 if no such k exists.

Original entry on oeis.org

5, 4, 5, 3, 6, 2, 2, 5, 8, 3, 4, 11, 15, 5, 2, 0, 4, 2, 14, 7, 48, 42, 6, 35, 2, 7, 602, 3, 16, 13, 2, 3, 2, 6, 37, 3185, 6, 9, 2, 33, 28, 2, 20, 9, 2, 135, 6, 5, 2, 49, 100, 5, 166, 5, 4, 9, 98, 15, 4, 27, 24, 2, 4, 17343, 34, 19, 24, 15, 56, 6, 90, 5, 2, 85
Offset: 1

Views

Author

Kevin P. Thompson, Jun 12 2023

Keywords

Comments

For n = 16, k^16 - 16 = (k^8 - 4)(k^8 + 4) = (k^4 - 2)(k^4 + 2)(k^8 + 4) always has at least three factors, so a(16) = 0. Similarly for any n of the form (2m)^4, so a(A016744(n)) = 0.

Examples

			For n = 3:
k = 1: 1^3 - 3 = -2 < 0 so ignore.
k = 2: 2^3 - 3 = 5 which is not semiprime.
k = 3: 3^3 - 3 = 24 = 2 * 2 * 2 * 3 which is not semiprime.
k = 4: 4^3 - 3 = 61 which is not semiprime.
k = 5: 5^3 - 3 = 122 = 2 * 61 which is semiprime.
Therefore, a(3) = 5 since k = 5 is the first value for which k^3 - 3 is semiprime.
		

Crossrefs

Showing 1-2 of 2 results.