OFFSET
1,1
COMMENTS
The PARI program below can be modified to generate "x"nomials for any number of constants where x = phi, sin(7), Pi^2, e^2, sqrt(2), sqrt(Pi), etc.
Allowing also negative x gives 29, 457, 769, 3499, 9011, 16193, 150889, 650359, 762049, ... Values P(x) are even if odd coefficients occur only for pairs (x^k, x^(k+1)), k>0; that's why 1 & 2 are the only possible "orders" (better: degree?) below 6. See A078114 for more comments. (M. F. Hasler, Jun 18 2007)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
enomialp(10,2) = 23, 61, 271, 373, 491, 941, 1123, 1321, 2011, 2273, 2551 3823 5351.
enomialp(10, 7) = 37, 274213, 2507737, 991740517, 4208201957, 23651295497, 61273838617.
MATHEMATICA
Select[Table[2*n^6+7*n^5+n^4+8*n^3+2*n^2+8*n+1, {n, 1, 300}], PrimeQ] (* Vincenzo Librandi, Jul 15 2012 *)
PROG
(PARI) enomialp(n, m) = { ct=0; sr=0; p=0; d=0; d1=0; default(realprecision, 28); pi = floor(exp(1)*10^(m)); /* replace exp(1) with Pi for pinomials, sqrt(2) for root2nomials etc.*/ for(x=1, n, p = pi; d = p%10; p = floor(p/10); y = d; for(j=1, m, d = p%10; p = floor(p/10); y+=x^j*d; ); if(isprime(y), ct+=1; print1(y" "); ); ) }
(PARI) xnomialprimes( N=25 /*# of terms*/, order=6, P=exp(1), X=1/*starting value or -1 for all integral x */, a=[] )={ local(t); P=Pol(vector(order+1, i, floor(10^(i-1)*P)%10)); X*=order=(X!=-1); while( #a<N, if( isprime( t=subst( P, x, X )) & !setsearch(Set(a), t), /*print([X, t]); */ a=concat(a, t)); if( order, X++, X=(X<=0)-X)); vecsort(a) } /* then xnomialprimes() gives the first 25 terms; xnomialprimes(, [null], [null], -1) gives also those for x<=0; xnomialprimes(30, 4, Pi, 0) gives 30 Pi-nomial primes of order 4 including the term 5=P(x=0), etc. */ (M. F. Hasler, Jun 18 2007)
(Magma) [ a: n in [1..100] | IsPrime(a) where a is 2*n^6+7*n^5+n^4+ 8*n^3+2*n^2+8*n+1]; // Vincenzo Librandi, Jul 15 2012
CROSSREFS
KEYWORD
easy,nonn,base,less
AUTHOR
Cino Hilliard, Dec 05 2002
EXTENSIONS
Corrected & edited by M. F. Hasler, Jun 18 2007
STATUS
approved