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!)
A227802 Positive numbers of the form a^b +- 1 where a is in the sequence and b>1. 1
1, 2, 3, 5, 7, 8, 9, 10, 15, 17, 24, 26, 28, 31, 33, 48, 50, 63, 65, 80, 82, 99, 101, 124, 126, 127, 129, 224, 226, 242, 244, 255, 257, 288, 290, 342, 344, 511, 513, 575, 577, 624, 626, 675, 677, 728, 730, 783, 785, 960, 962, 999, 1001, 1023, 1025, 1088, 1090 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

EXAMPLE

1 is the seed value of the sequence. 2 is in the sequence because 2 = 1^2 + 1 and 1 is in the sequence. 3 is in the sequence because 3 = 2^2 - 1 and 2 is in the sequence.

PROG

(Python)

def func(i):

.a=[2]

.pows={2:2}

.for rep in range(i):

..for x in a[:]:

...if not x**pows[x]-1 in a:

....a.append(x**pows[x]-1)

....pows[x**pows[x]-1]=2

...if not x**pows[x]+1 in a:

....a.append(x**pows[x]+1)

....pows[x**pows[x]+1]=2

...pows[x]+=1

..a.sort()

.return a

(PARI) is(n)=if(n<4, 1, my(t); (ispower(n-1, , &t)&&is(t)) || (ispower(n+1, , &t)&&is(t))) \\ Charles R Greathouse IV, Aug 08 2013

(PARI) list(lim)=my(v=List([1, 2]), i=1); while(i++<=#v, for(e=2, log(lim+2)\log(v[i]), listput(v, v[i]^e-1); listput(v, v[i]^e+1))); vecsort(Vec(v), , 8) \\ Charles R Greathouse IV, Aug 08 2013

CROSSREFS

Cf. A080262.

Sequence in context: A039048 A105764 A226811 * A329780 A228856 A274688

Adjacent sequences:  A227799 A227800 A227801 * A227803 A227804 A227805

KEYWORD

nonn

AUTHOR

Alexander E. Koren, Jul 31 2013

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 April 22 19:11 EDT 2021. Contains 343177 sequences. (Running on oeis4.)