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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

Alexander E. Koren, Jul 31 2013

Keywords

Examples

			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.
		

Crossrefs

Cf. A080262.

Programs

  • 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
  • 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
    

A292538 Lucas-Carmichael numbers of the form k^2 - 1.

Original entry on oeis.org

399, 2915, 7055, 63503, 147455, 1587599, 1710863, 2249999, 2924099, 6656399, 9486399, 14288399, 19289663, 25603599, 26936099, 28451555, 31270463, 32148899, 45158399, 49280399, 71368703, 91011599, 105884099, 111513599, 144288143, 146894399, 150405695, 152028899, 175827599
Offset: 1

Views

Author

Amiram Eldar, Sep 18 2017

Keywords

Comments

Intersection of A005563 and A006972.
The numbers k such that k^2 - 1 is a Lucas-Carmichael number are 20, 54, 84, 252, 384, 1260, 1308, 1500, 1710, 2580, 3080, 3780, 4392, ...
From David A. Corneth, Aug 26 2023: (Start)
As k^2 - 1 = (k - 1)*(k + 1) and k is even we have k-1 and k+1 are coprime. So we can factor k-1 and k+1 separately when checking if k^2 - 1 is a term.
Possible other ideas are factoring an odd number only once, keeping it for the factorization of k^2 - 1 and (k + 2)^2 - 1. Alternatively dodging k = 18m +- 8, 18m +- 10 or 50m +- 24, 50m +- 26 to not get numbers that are multiples of odd primes squared. (End)
Wagstaff (2024) found that among the first 10^4 Lucas-Carmichael numbers there are 164 that are also Cunningham numbers (A080262) and that all of them are in this sequence. Below 10^15 there are 682 Lucas-Carmichael numbers that are also Cunningham numbers, and all of them are in this sequence (checked using the list of Lucas-Carmichael numbers by Daniel Suteu at A006972). - Amiram Eldar, Dec 29 2024

Crossrefs

Programs

  • Maple
    filter:= t ->
      andmap(f -> f[2]=1 and (t+1) mod (f[1]+1) = 0, ifactors(t)[2]):
    select(filter, [seq(k^2-1, k=3..10^5)]); # Robert Israel, Sep 24 2017
  • Mathematica
    lcQ[n_] := !PrimeQ[n] && Union[Transpose[FactorInteger[n]][[2]]] == {1} && Union[Mod[n + 1, Transpose[FactorInteger[n]][[1]] + 1]] == {0}; Select[Range[2, 10^4]^2 - 1, lcQ]

Extensions

More terms from David A. Corneth, Aug 26 2023
Showing 1-2 of 2 results.