Apéry Number

Author

Eric W. Weisstein
October 4, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/AperyNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/AperyNumber.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Code

AperyA[0]:=1
AperyA[1]:=5
AperyA[n_]:=((-(((-1+n))^3) AperyA[-2+n]+(-5+27 n-51 (n^2)+34 (n^3)) AperyA[-1+n])/(n^3))

AperyB[0]:=1
AperyB[1]:=3
AperyB[n_]:=AperyB[n]=(((((-1+n))^2) AperyB[-2+n]+(3-11 n+11 (n^2)) AperyB[-1+n])/(n^2))

Apery A

Enumeration

AperyA/@Range[0,10]

Primes

(p=Position[AperyA/@Range[10^3],_?PrimeQ]//Flatten)//Timing

(p=Position[AperyA/@Range[10^4],_?PrimeQ]//Flatten)//Timing

Floor[Log[10,Function[n,HypergeometricPFQ[{-n,-n,1+n,1+n},{1,1,1},1]][6624]]]+1//Timing

Most[AperyA/@p]

Sums

V5

Sum[Binomial[n,k]^2Binomial[n+k,k]^2,{k,0,n}]

V7

Sum[Binomial[n,k]^2Binomial[n+k,k]^2,{k,0,n}]

Sum[(((((n+k)!))^2)/((((k!))^4)((((n-k)!))^2))),{k,0,n}]

Function[n,HypergeometricPFQ[{-n,-n,1+n,1+n},{1,1,1},1]]/@Range[0,10]

Sum[Binomial[n,k]Binomial[n+k,k]((Binomial[k,j])^3),{k,0,n},{j,0,n}]

Table[Sum[Binomial[n,k]Binomial[n+k,k]((Binomial[k,j])^3),{k,0,n},{j,0,n}],{n,0,10}]

Sum[Binomial[n,k]Binomial[n+k,k]((Binomial[k,j])^3),{j,0,n},{k,0,n}]

Table[Sum[Binomial[n,k]Binomial[n+k,k]((Binomial[k,j])^3),{j,0,n},{k,0,n}],{n,0,10}]

Recurrence

<<"zb_alg.m"

Solve[First[Zb[Binomial[n,k]^2Binomial[n+k,k]^2,k,n,2]/.{F[k_,n_]:>a[n],Delta[__]:>0}/.n->n-2],a[n]]//Simplify

RSolve[{a[n]==((34(n-1)^3+51(n-1)^2+27(n-1)+5)a[n-1]-(n-1)^3 a[n-2])/n^3,a[0]==1,a[1]==5},a[n],n]

a[0]:=1
a[1]:=5
a[n_]:=((34(n-1)^3+51(n-1)^2+27(n-1)+5)a[n-1]-(n-1)^3 a[n-2])/n^3

Table[a[n],{n,0,10}]

Congruences

Table[Mod[Apery[m p^r-1]-Apery[m p^(r-1)-1] ,p^(3r)] /. {p->Prime[Random[Integer,{3,5}]],m->Random[Integer,{1,4}],r->Random[Integer,{1,3}]},{10}]  /. Apery->AperyA

Table[Mod[Apery[m p^r-1]-Apery[m p^(r-1)-1] ,p^(3r)] /. {p->Prime[Random[Integer,{3,5}]],m->Random[Integer,{1,4}],r->Random[Integer,{1,3}]},{10}]  /. Apery->AperyB

FullSimplify[q Product[(((1-(q^(2n))))^4)(((1-(q^(4n))))^4),{n,Infinity}]]//TraditionalForm

Series[q ((QPochhammer[(q^2),(q^2)])^4) ((QPochhammer[(q^4),(q^4)])^4),{q,0,30}]//Normal

SeriesCoefficient[q ((QPochhammer[(q^2),(q^2)])^4) ((QPochhammer[(q^4),(q^4)])^4),{q,0,n}]

gl=Drop[CoefficientList[g,q],1]

Select[CoefficientList[g,q],#≠0&]

Table[Mod[AperyA[(Prime[n]-1)/2]-gl[[Prime[n]]],Prime[n]],{n,2,10}]

Diagonal

TimeConstrained[Sum[((Binomial[m,k])^2)((Binomial[n,k])^2)Binomial[2m+n-j-k,2m],{k,-∞,∞},{j,-∞,∞}],600]//Timing

Sum[((Binomial[m+n-k,k])^2)((Binomial[m+n-2k,m-k])^2),{k,-∞,∞}]

TimeConstrained[Sum[Binomial[m,k]Binomial[n,k]Binomial[m+k,k]Binomial[n+k,k],{k,-∞,∞}],600]//Timing

AperyB

Enumeration

AperyB/@Range[0,10]

Primes

(p=Position[AperyB/@Range[10^3],_?PrimeQ]//Flatten)//Timing

(p=Position[AperyB/@Range[10^4],_?PrimeQ]//Flatten)//Timing

(p=Position[AperyB/@Range[2 10^4],_?PrimeQ]//Flatten)//Timing

Digits[AperyB[8]]

(p=Position[AperyB/@Range[10^5],_?PrimeQ]//Flatten)//Timing

(p=Position[AperyB/@Range[10^5],_?PrimeQ]//Flatten)//Timing

AperyB[0]:=1
AperyB[1]:=3
AperyB[n_]:=AperyB[n]=(((((-1+n))^2) AperyB[-2+n]+(3-11 n+11 (n^2)) AperyB[-1+n])/(n^2))

p={1};
t=AbsoluteTime[];
d2=1;
d1=3;
Do[
d=(((((-1+n))^2) d2+(3-11 n+11 (n^2)) d1)/(n^2));
d2=d1;
d1=d;
If[PrimeQ[d],Print["PRIME: ",AppendTo[p,n]]];
If[Mod[n,1000]==0,Print[n," ",Round[AbsoluteTime[]-t],"..."]],
{n,2,10^6}
]

AperyB/@p

Sums

Sum[Binomial[n,k]^2Binomial[n+k,k],{k,0,n}]

Table[HypergeometricPFQ[{-n,-n,1+n},{1,1},1],{n,0,10}]

Recurrence

<<zb_alg.m

Solve[First[Zb[Binomial[n,k]^2Binomial[n+k,k],k,n,2]/.{F[k_,n_]:>b[n],Delta[__]:>0}/.n->n-2],b[n]]//Simplify

b[0]:=1
b[1]:=3
b[n_]:=b[n]=(((((-1+n))^2) b[-2+n]+(3-11 n+11 (n^2)) b[-1+n])/(n^2))

b/@Range[10]

RSolve[{b[n]==(((((-1+n))^2) b[-2+n]+(3-11 n+11 (n^2)) b[-1+n])/(n^2)),b[0]==1,b[1]==3},b[n],n]