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 21-22 of 22 results.

A288994 a(n) = n*(n+3) when n is congruent to 0 or 3 (mod 4), and n*(n+3)/2 otherwise.

Original entry on oeis.org

0, 2, 5, 18, 28, 20, 27, 70, 88, 54, 65, 154, 180, 104, 119, 270, 304, 170, 189, 418, 460, 252, 275, 598, 648, 350, 377, 810, 868, 464, 495, 1054, 1120, 594, 629, 1330, 1404, 740, 779, 1638, 1720, 902, 945, 1978, 2068, 1080, 1127, 2350, 2448, 1274, 1325
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n (n+3) Switch[Mod[n, 4], 0|3, 1, _, 1/2]; Table[a[n], {n, 0, 50}]
    Table[If[MemberQ[{0,3},Mod[n,4]],n(n+3),(n(n+3))/2],{n,0,50}] (* or *) LinearRecurrence[{3,-6,10,-12,12,-10,6,-3,1},{0,2,5,18,28,20,27,70,88},60] (* Harvey P. Dale, Jun 05 2021 *)
  • PARI
    concat(0, Vec(x*(2 - x + 15*x^2 - 16*x^3 + 18*x^4 - 9*x^5 + 5*x^6 - 2*x^7) / ((1 - x)^3*(1 + x^2)^3) + O(x^60))) \\ Colin Barker, Jun 21 2017
    
  • PARI
    i=I; a(n) = (1/8 + i/8)*(((3 - 3*i) - i*(-i)^n + i^n)*n*(3 + n)) \\ Colin Barker, Jun 21 2017

Formula

a(n) = n*(n+3)/2 * (2 - floor((n+1)/2) mod 2), where n*(n+3)/2 is A000096(n).
a(n) = A060819(n+3)*A145979(n-2).
a(n) = (2*n*(n+3))/(GCD(4, n+2)*GCD(4, n+3)).
a(n) = A227316(n+1) - (period 4 repeat 2,1,1,2).
From Colin Barker, Jun 21 2017: (Start)
G.f.: x*(2 - x + 15*x^2 - 16*x^3 + 18*x^4 - 9*x^5 + 5*x^6 - 2*x^7) / ((1 - x)^3*(1 + x^2)^3).
a(n) = (1/8 + i/8)*(((3 - 3*i) - i*(-i)^n + i^n)*n*(3 + n)), where i=sqrt(-1). (End)
Sum_{n>=1} 1/a(n) = 17/18 + log(2)/6. - Amiram Eldar, Aug 12 2022

A306591 a(n) is the denominator of 1/2 - 1/(prime(n)+1), where prime(n) is the n-th prime.

Original entry on oeis.org

6, 4, 3, 8, 12, 7, 9, 20, 24, 15, 32, 19, 21, 44, 48, 27, 60, 31, 68, 72, 37, 80, 84, 45, 49, 51, 104, 108, 55, 57, 128, 132, 69, 140, 75, 152, 79, 164, 168, 87, 180, 91, 192, 97, 99, 200, 212, 224, 228, 115, 117, 240, 121, 252, 129, 264, 135, 272, 139, 141, 284, 147, 308, 312, 157
Offset: 1

Views

Author

Michel Marcus, Feb 26 2019

Keywords

Crossrefs

Cf. A236965 (numerators).
Cf. A145979 (denominator of 1/2 - 1/(n+1)).

Programs

  • Mathematica
    1/2-1/(#+1)&/@Prime[Range[70]]//Denominator (* Harvey P. Dale, Feb 19 2023 *)
  • PARI
    a(n) = denominator(1/2 - 1/(prime(n)+1));
    
  • Python
    from sympy import prime
    from fractions import Fraction
    def a(n): return (Fraction(1, 2) - Fraction(1, (prime(n)+1))).denominator
    print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Jun 04 2021
Previous Showing 21-22 of 22 results.