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-3 of 3 results.

A176303 a(n) = abs(2^n-127).

Original entry on oeis.org

126, 125, 123, 119, 111, 95, 63, 1, 129, 385, 897, 1921, 3969, 8065, 16257, 32641, 65409, 130945, 262017, 524161, 1048449, 2097025, 4194177, 8388481, 16777089, 33554305, 67108737, 134217601, 268435329, 536870785, 1073741697, 2147483521, 4294967169
Offset: 0

Views

Author

Vladimir Shevelev, Apr 14 2010

Keywords

Examples

			a(2) = abs(2^2-127) = abs(4-127) = abs(-123) = 123. - _Indranil Ghosh_, Feb 20 2017
		

References

  • R. K. Guy, Unsolved problems in number theory, Vol.1, 1994, Springer-Verlag,pages 42-43.

Crossrefs

See A175347, A169716 for primes.

Programs

  • Mathematica
    Table[Abs[2^n-127],{n,0,32}] (* or *) CoefficientList[Series[(126 - 253*x + 2*x^7 + 252*x^8) / ((1 - x)*(1 - 2*x)) ,{x,0,30}],x] (* Indranil Ghosh, Feb 20 2017 *)
    LinearRecurrence[{3,-2},{126,125,123,119,111,95,63,1,129},40] (* Harvey P. Dale, Feb 11 2024 *)
  • PARI
    Vec((126 - 253*x + 2*x^7 + 252*x^8) / ((1 - x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Feb 20 2017
    
  • PARI
    a(n)=abs(2^n-127) \\ Charles R Greathouse IV, Feb 20 2017
  • Python
    def A176303(n): return abs(2**n-127) # Indranil Ghosh, Feb 20 2017
    

Formula

From Colin Barker, Feb 20 2017: (Start)
a(n) = 2^n - 127 for n>6.
a(n) = 3*a(n-1) - 2*a(n-2) for n>8.
G.f.: (126 - 253*x + 2*x^7 + 252*x^8) / ((1 - x)*(1 - 2*x)).
(End)

A169716 Numbers k such that 2^k - 127 is prime.

Original entry on oeis.org

47, 55, 103, 143, 391, 2807, 11647, 19223, 264655
Offset: 1

Views

Author

Zak Seidov, Apr 18 2010

Keywords

Comments

Exponents k arising in A175347: see that sequence for the actual primes.
The next term is > 10^4. [M. F. Hasler, Apr 18 2010]
All terms are == 7 (mod 8). [M. F. Hasler, Apr 18 2010]
No more terms through 78815. - Charles R Greathouse IV, Apr 19 2010
a(10) > 300000. - Michael S. Branicky, Jul 11 2025

Crossrefs

Programs

Extensions

More terms from M. F. Hasler, Apr 18 2010
a(7)-a(8) from Charles R Greathouse IV, Apr 19 2010
a(9) from Michael S. Branicky, Jul 10 2025

A176494 Least m >= 1 for which |2^m - prime(n)| is prime.

Original entry on oeis.org

3, 1, 1, 2, 1, 2, 1, 2, 4, 1, 3, 2, 1, 2, 4, 4, 1, 3, 2, 1, 3, 2, 4, 3, 2, 1, 2, 1, 2, 47, 2, 6, 1, 8, 1, 3, 5, 2, 4, 4, 1, 6, 1, 2, 1, 5, 5, 2, 1, 2, 4, 1, 8, 4, 6, 8, 1, 3, 2, 1, 4, 7, 2, 1, 2, 9, 791, 4, 1, 2, 8, 3, 9, 5, 2, 4, 3, 2, 3, 8, 1, 6, 1, 3, 2, 4, 3, 2, 1, 2, 4, 3, 2, 3
Offset: 2

Views

Author

Vladimir Shevelev, Apr 19 2010, Aug 15 2010

Keywords

Comments

a(n)=1 iff p_n is second of twin primes (A006512); for n > 4, a(n)=2 iff p_n is second of cousin primes (A046132). It is interesting to continue this sequence in order to find big jumps such as a(31)-a(30). Is it true that such jumps can be arbitrarily large, either (a) in the sense of differences a(n+1)-a(n), or (b) in the sense of ratios a(n+1)/a(n)?
Conjecture. For every odd prime p, the sequence {|2^n - p|} contains at least one prime. The record values of the sequence appear at n = 2, 10, 31, 68, 341, ... and are 3, 4, 47, 791, ... Note that up to now the value a(341) is not known. Charles R Greathouse IV calculated the following two values: a(815)=16464, a(591)=58091 and noted that a(341) is much larger [private communication, May 27 2010]. - Vladimir Shevelev, May 29 2010

Crossrefs

Programs

  • Mathematica
    lm[n_]:=Module[{m=1},While[!PrimeQ[Abs[2^m-n]],m++];m]; Table[lm[i],{i,Prime[ Range[2,100]]}] (* Harvey P. Dale, Aug 11 2014 *)

Extensions

Beginning with a(31), the terms were calculated by Zak Seidov - private communication, Apr 20 2010
Sequence extended by R. J. Mathar via the Seqfan Discussion List, Aug 15 2010
Showing 1-3 of 3 results.