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!)
A239133 Numbers n such that n^p_1 + n^p_2 + ... + n^p_k + 1 is prime where p_1,...p_k denote each prime factor of n, not necessarily distinct. 1
2, 8, 9, 12, 20, 28, 39, 48, 72, 90, 92, 96, 120, 128, 162, 272, 308, 340, 408, 472, 486, 510, 572, 690, 810, 912, 936, 972, 1107, 1224, 1312, 1444, 1632, 1734, 1870, 1890, 2002, 2106, 2432, 2592, 2912, 2916, 3004, 3068, 3768, 3834, 4256, 4394, 4557, 4725 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..112

EXAMPLE

12 = 2*2*3 and 12^2+12^2+12^3+1 = 2017 is prime. Thus, 12 is a member of this sequence.

MAPLE

isA239133 := proc(n)

    ps := ifactors(n)[2] ;

    1+add( op(2, p)*n^op(1, p), p=ps) ;

    isprime(%) ;

end proc:

for n from 1 do

    if isA239133(n) then

        printf("%d, \n", n) ;

    end if;

end do: # R. J. Mathar, Mar 13 2014

PROG

(Python)

import sympy

from sympy import factorint

from sympy import isprime

def Exp(x):

..lst = []

..for i in range(len(factorint(x).values())):

....for a in range(list(factorint(x).values())[i]):

......lst.append(list(factorint(x))[i])

..num = 1

..for n in lst:

....num += x**n

..if isprime(num):

....return True

x = 1

while x < 10**4:

..if Exp(x):

....print(x)

..x += 1

(PARI) is(n)=my(f=factor(n)); ispseudoprime(sum(i=1, #f~, f[i, 2]*n^f[i, 1])+1) \\ Charles R Greathouse IV, Mar 12 2014

CROSSREFS

Sequence in context: A120737 A081381 A235524 * A166686 A064833 A281296

Adjacent sequences:  A239130 A239131 A239132 * A239134 A239135 A239136

KEYWORD

nonn

AUTHOR

Derek Orr, Mar 10 2014

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 June 13 00:57 EDT 2021. Contains 344980 sequences. (Running on oeis4.)