login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A173912 Numbers x that when put through Lucas-Lehmer tests give a residue that has a digital root of 0 or 9. 0
3, 5, 7, 13, 17, 19, 23, 31, 33, 51, 61, 71, 89, 101, 107, 127, 139, 191, 271, 273, 305, 331, 347, 351, 367, 397, 405, 407, 427, 435, 457, 467, 489, 521, 525, 539, 543, 549, 559, 565, 577, 583, 589, 597, 601, 607, 611, 613, 617, 619, 641, 643, 661, 693, 717, 729, 787, 793, 809, 817, 819, 837, 871, 879, 891, 899, 983, 987, 991 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The PARI code uses a function that assumes 0 has a digital root of 9.

Note: since I allowed 0 to count as having digital root 9, all Mersenne prime exponents > 2 will be a subsequence of this sequence.

LINKS

Table of n, a(n) for n=1..69.

MATHEMATICA

lucaslehmer2Q[p_] := Module[{s = 4, x}, For[x = 1, x <= p-2, x++, s = Mod[s^2 - 2, 2^p - 1]; If[x == p-2 && sumdigits1[s] == 9, Return[True]]]; False];

sumdigits1[n_] := If[Mod[n, 9] != 0, Mod[n, 9], 9];

Select[Range[1000], lucaslehmer2Q] (* Jean-Fran├žois Alcover, Sep 28 2020, after PARI *)

PROG

(PARI) lucaslehmer2(p) = s=4; for(x=1, p-2, s=(s^2-2)%(2^p-1)); if(x=p-2 && sumdigits1(s)==9, print1(p", "))

sumdigits1(n)=if(n%9!=0, n%9, 9)

for(x=1, 1000, lucaslehmer2(x))

CROSSREFS

Sequence in context: A023208 A162358 A154320 * A049231 A268629 A092195

Adjacent sequences:  A173909 A173910 A173911 * A173913 A173914 A173915

KEYWORD

nonn,base,changed

AUTHOR

Roderick MacPhee, Nov 26 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 30 03:30 EDT 2020. Contains 337432 sequences. (Running on oeis4.)