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.

A332115 a(n) = (10^(2n+1)-1)/9 + 4*10^n.

Original entry on oeis.org

5, 151, 11511, 1115111, 111151111, 11111511111, 1111115111111, 111111151111111, 11111111511111111, 1111111115111111111, 111111111151111111111, 11111111111511111111111, 1111111111115111111111111, 111111111111151111111111111, 11111111111111511111111111111, 1111111111111115111111111111111
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

See A107125 = {0, 1, 7, 45, 115, 681, 1248, ...} for the indices of primes.

Crossrefs

Cf. (A077783-1)/2 = A107125: indices of primes; A331868 & A331869 (non-palindromic variants).
Cf. A002275 (repunits R_n = (10^n-1)/9), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits), A002113 (palindromes).
Cf. A332125 .. A332195 (variants with different repeated digit 2, ..., 9).
Cf. A332112 .. A332119 (variants with different middle digit 2, ..., 9).

Programs

  • Maple
    A332115 := n -> (10^(2*n+1)-1)/9+4*10^n;
  • Mathematica
    Array[(10^(2 # + 1)-1)/9 + 4*10^# &, 15, 0]
  • PARI
    apply( {A332115(n)=10^(n*2+1)\9+4*10^n}, [0..15])
    
  • Python
    def A332115(n): return 10**(n*2+1)//9+4*10**n

Formula

a(n) = A138148(n) + 5*10^n = A002275(2n+1) + 4*10^n.
G.f.: (5 - 404*x + 300*x^2)/((1 - x)(1 - 10*x)(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n > 2.

A107125 Numbers k such that (10^(2*k+1) + 36*10^k - 1)/9 is prime.

Original entry on oeis.org

0, 1, 7, 45, 115, 681, 1248, 2481, 2689, 6198, 13197, 60126, 100072
Offset: 1

Views

Author

Farideh Firoozbakht, May 19 2005

Keywords

Comments

k is in the sequence iff the palindromic number 1(k).5.1(k) is prime (dot between numbers means concatenation). If k is in the sequence then k is not of the forms 3m+2, 18m+12, 18m+14, 22m+4, 22m+6, etc. (the proof is easy).
a(14) > 100233. - _Robert Price, Sep 05 2023

Examples

			1248 is in the sequence because (10^(2*1248+1)+36*10^1248-1)/9=1(1248).5.1(1248) is prime.
		

References

  • C. Caldwell and H. Dubner, "Journal of Recreational Mathematics", Volume 28, No. 1, 1996-97, pp. 1-9.

Crossrefs

Programs

  • Magma
    [n: n in [0..700] | IsPrime((10^(2*n+1)+36*10^n-1) div 9)]; // Vincenzo Librandi, Oct 13 2015
    
  • Mathematica
    Do[If[PrimeQ[(10^(2n + 1) + 36*10^n - 1)/9], Print[n]], {n, 2200}]
  • PARI
    is(n)=ispseudoprime((10^(2*n+1)+36*10^n-1)/9) \\ Charles R Greathouse IV, Jun 06 2017

Formula

a(n) = (A077783(n)-1)/2.

Extensions

Edited by Ray Chandler, Dec 28 2010
a(12) from Robert Price, Oct 12 2015
a(13) from Robert Price, Sep 05 2023

A331869 Numbers n for which R(n) + 4*10^floor(n/2) is prime, where R(n) = (10^n-1)/9 (repunit: A002275).

Original entry on oeis.org

1, 3, 4, 15, 76, 91, 231, 1363, 1714, 1942, 2497, 4963, 5379, 12397, 23224, 26395
Offset: 1

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

For n > 1, the corresponding primes are a subset of A105992: near-repunit primes.
In base 10, R(n) + 4*10^floor(n/2) has ceiling(n/2)-1 digits 1, one digit 5, and again floor(n/2) digits 1, except for n = 0. For odd n, this is a palindrome (a.k.a. wing prime, cf. A077783: subsequence of odd terms), for even n the digit 5 is just left to the middle of the number.
See also the variant A331868 where the digit 5 is just to the right of the middle.

Examples

			For n = 1, R(1) + 4*10^floor(1/2) = 5 is prime.
For n = 3, R(3) + 4*10^floor(3/2) = 151 is prime.
For n = 4, R(4) + 4*10^floor(4/2) = 1511 is prime.
For n = 15, R(15) + 4*10^floor(15/2) = 111111151111111 is prime.
		

Crossrefs

Cf. A105992 (near-repunit primes), A002275 (repunits), A004023 (indices of prime repunits), A011557 (powers of 10).
Cf. A331862, A331861, A331865, A331866 (variants with digit 0, 2, 3 or 4 instead of 5), A331868 (variant with floor(n/2-1) instead of floor(n/2)).
Cf. A077783 (odd terms).

Programs

  • Mathematica
    Select[Range[0, 2500], PrimeQ[(10^# - 1)/9 + 4*10^Floor[#/2]] &]
  • PARI
    for(n=0,9999,ispseudoprime(p=10^n\9+4*10^(n\2))&&print1(n","))

Extensions

a(12)-a(14) from Michael S. Branicky, Feb 03 2023
a(15)-a(16) from Michael S. Branicky, Apr 11 2023
Showing 1-3 of 3 results.