OFFSET
1,3
COMMENTS
This sequence is generalizable : the smallest k such that k^3 + p is divisible by 3^n exists if the prime p is congruent to + - 1 mod 18. For example, the sequence with p = 19 is given by {2, 2, 2, 20, 20, 20, 263, 992, 3179, 16301, 55667, 173765, 528059, …}. (See A129805). This sequence is given with the smallest p = 17.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4) = 4 because 4^3 + 17 = 81 is divisible by 3^4.
MAPLE
with(numtheory):for n from 1 to 20 do:i:=0:for x from 1 to 10^8 while(i=0) do: z:= x^3 + 17:if irem(z, 3^n)=0 then i:=1: printf ( "%d %d \n", n, x):else fi:od:od:
PROG
(PARI) print1(k=1); for(n=2, 100, if(Mod(k, 3^n)^3!=-17, k+=3^(n-2)* if(Mod(k+3^(n-2), 3^n)^3==-17, 1, 2)); print1(", "k)) \\ Charles R Greathouse IV, May 14 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, May 14 2012
EXTENSIONS
a(20)-a(29) from Charles R Greathouse IV, May 14 2012
STATUS
approved