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

A073666 Rearrangement of natural numbers such that a(k)*a(k+1) + 1 is a prime for all k.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 12, 13, 10, 15, 14, 17, 18, 11, 30, 19, 22, 16, 21, 20, 23, 26, 33, 34, 27, 28, 24, 25, 42, 31, 36, 32, 29, 38, 39, 48, 37, 40, 43, 46, 51, 50, 45, 52, 49, 54, 44, 47, 56, 41, 62, 59, 60, 53, 66, 35, 68, 57, 58, 55, 70, 61, 76, 63, 74, 69, 72, 71, 98
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=(For[c=Sort[Table[a[k], {k, n-1}]]; d=Append[c, Last[c]+1]; m=First[Complement[Range[Last[d]], c]], MemberQ[c, m]||!PrimeQ[m*a[n-1]+1], m++ ]; m); Table[a[k], {k, 70}] (* Farideh Firoozbakht, Apr 14 2004 *)
  • PARI
    A073666(n,show=1,a=1,u=[a])={for(n=2,n,show&&print1(a",");for(k=u[1]+1,9e9,!setsearch(u,k) && isprime(a*k+1) && (a=k) && break);u=setunion(u,[a]); while(#u>1&&u[2]==u[1]+1,u=u[2..-1]));a} \\ Use 2nd, 3rd or 4th optional arg to display intermediate terms, to use another starting value, to exclude some terms. - M. F. Hasler, Nov 24 2015

Extensions

More terms from Jason Earls, Aug 26 2002
Offset changed to 1 by Ivan Neretin, Mar 06 2016

A112848 Expansion of eta(q)*eta(q^2)*eta(q^18)^2/(eta(q^6)*eta(q^9)) in powers of q.

Original entry on oeis.org

1, -1, -2, 1, 0, 2, 2, -1, -2, 0, 0, -2, 2, -2, 0, 1, 0, 2, 2, 0, -4, 0, 0, 2, 1, -2, -2, 2, 0, 0, 2, -1, 0, 0, 0, -2, 2, -2, -4, 0, 0, 4, 2, 0, 0, 0, 0, -2, 3, -1, 0, 2, 0, 2, 0, -2, -4, 0, 0, 0, 2, -2, -4, 1, 0, 0, 2, 0, 0, 0, 0, 2, 2, -2, -2, 2, 0, 4, 2, 0, -2, 0, 0, -4, 0, -2, 0, 0, 0, 0, 4, 0, -4, 0, 0, 2, 2, -3, 0, 1, 0, 0, 2, -2, 0
Offset: 1

Views

Author

Michael Somos, Sep 22 2005

Keywords

Crossrefs

Cf. A033687, A033762, A092829, A093829, A097195, A248897, A255648 (absolute values).

Programs

  • Mathematica
    QP = QPochhammer; s = QP[q]*QP[q^2]*(QP[q^18]^2/(QP[q^6]*QP[q^9])) + O[q]^100; CoefficientList[s, q] (* Jean-François Alcover, Nov 25 2015 *)
    f[p_, e_] := If[Mod[p, 6] == 1, e+1, (1+(-1)^e)/2]; f[2, e_] := (-1)^e; f[3, e_]:= -2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 28 2024 *)
  • PARI
    {a(n)=if(n<1, 0, if(n%3==0, n/=3; -2,1)* sumdiv(n,d,kronecker(-12,d) -if(d%2==0, 2*kronecker(-3,d/2))))}
    
  • PARI
    {a(n)=local(A); if (n<1, 0, n--; A=x*O(x^n); polcoeff( eta(x+A)*eta(x^2+A)*eta(x^18+A)^2/ eta(x^6+A)/eta(x^9+A), n))}

Formula

Euler transform of period 18 sequence [ -1, -2, -1, -2, -1, -1, -1, -2, 0, -2, -1, -1, -1, -2, -1, -2, -1, -2, ...].
Moebius transform is period 18 sequence [1, -2, -3, 2, -1, 6, 1, -2, 0, 2, -1, -6, 1, -2, 3, 2, -1, 0, ...].
Multiplicative with a(2^e) = (-1)^e, a(3^e) = -2 if e>0, a(p^e) = e+1 if p == 1 (mod 6), a(p^e) = (1+(-1)^e)/2 if p == 5 (mod 6).
G.f.: Sum_{k>0} Kronecker(-3, k) x^k(1-x^(2k))^2/(1-x^(6k)) = x Product_{k>0} (1-x^k)(1-x^(2k))(1+x^(9k))(1+x^(6k)+x^(12k)).
a(3n) = -2*A092829(n). a(3n+1) = A093829(3n+1) = A033687(n). a(3n+2) = A093829(3n+2). a(6n)/2 = A093829(n). a(6n+1) = A097195(n). a(6n+3) = -2*A033762(n). a(6n+5) = 0.
Sum_{k=1..n} abs(a(k)) ~ c * n, where c = 2*Pi/(3*sqrt(3)) = 1.209199... (A248897). - Amiram Eldar, Jan 23 2024

A092842 a(n) is the solution of the equation A073666(x) = n (A073666(a(n)) = n).

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 12, 17, 10, 11, 14, 13, 21, 15, 16, 19, 23, 22, 20, 24, 30, 31, 25, 28, 29, 36, 18, 33, 35, 26, 27, 59, 34, 40, 37, 38, 41, 53, 32, 42, 50, 46, 43, 51, 39, 48, 45, 44, 47, 57, 49, 63, 52, 61, 62, 55, 56, 65, 54, 67, 74, 88, 58, 75, 60, 69, 64
Offset: 1

Views

Author

Farideh Firoozbakht, Apr 15 2004

Keywords

Comments

For each n number of solutions of the equation A073666(x) =n is less than 2 because the terms of the sequence A073666 are distinct. Conjecture: This sequence is infinite(see A073666).

Crossrefs

Showing 1-3 of 3 results.