cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A227802 Positive numbers of the form a^b +- 1 where a is in the sequence and b>1.

This page as a plain text file.
%I A227802 #15 May 22 2025 10:21:35
%S A227802 1,2,3,5,7,8,9,10,15,17,24,26,28,31,33,48,50,63,65,80,82,99,101,124,
%T A227802 126,127,129,224,226,242,244,255,257,288,290,342,344,511,513,575,577,
%U A227802 624,626,675,677,728,730,783,785,960,962,999,1001,1023,1025,1088,1090
%N A227802 Positive numbers of the form a^b +- 1 where a is in the sequence and b>1.
%H A227802 Charles R Greathouse IV, <a href="/A227802/b227802.txt">Table of n, a(n) for n = 1..10000</a>
%e A227802 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.
%o A227802 (Python)
%o A227802 def func(i):
%o A227802  a=[2]
%o A227802  pows={2:2}
%o A227802  for rep in range(i):
%o A227802   for x in a[:]:
%o A227802    if not x**pows[x]-1 in a:
%o A227802     a.append(x**pows[x]-1)
%o A227802     pows[x**pows[x]-1]=2
%o A227802    if not x**pows[x]+1 in a:
%o A227802     a.append(x**pows[x]+1)
%o A227802     pows[x**pows[x]+1]=2
%o A227802    pows[x]+=1
%o A227802   a.sort()
%o A227802  return a
%o A227802 (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
%o A227802 (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
%Y A227802 Cf. A080262.
%K A227802 nonn
%O A227802 1,2
%A A227802 _Alexander E. Koren_, Jul 31 2013