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-10 of 16 results. Next

A096504 Euler-phi applied to A096503 results in these decimal repdigits.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 4, 6, 8, 8, 6, 8, 22, 8, 8, 22, 66, 44, 88, 44, 88, 66, 44, 88, 88, 222, 88, 88, 222, 444, 444, 888, 888, 444, 888, 888, 888, 888, 888, 888, 444444, 666666, 444444, 888888, 888888, 666666, 888888, 888888, 888888, 888888, 888888
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Examples

			a(60) = A000010(A096503(60)) = A000010(88888892) = 44444444.
Regular solutions: if p = repdigit + 1 is prime, then phi(p) = repdigit.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {for (n= 1, nn, phin = eulerphi(n); d = digits(e=eulerphi(n)); if (vecmin(d) == vecmax(d), print1(e, ", ")););} \\ Michel Marcus, Sep 07 2014

Formula

a(n) = A000010(A096503(n)).

A096508 Numbers k for which 8*R_k + 1 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

2, 14, 17, 35, 4175, 4472, 9812, 12260, 12341, 13760, 14576, 53411, 144683, 148328
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Comments

Also numbers k such that (8*10^k + 1)/9 is prime.
a(15) > 2*10^5. - Robert Price, Sep 06 2014

Examples

			35 is a term because 88888888888888888888888888888888889 (34 8's) is a prime number.
		

Crossrefs

Programs

  • Maple
    select(n -> isprime((8*10^n+1)/9), [$1..10000]); # Robert Israel, Sep 07 2014
  • Mathematica
    Do[ If[ PrimeQ[ 8(10^n - 1)/9 + 1], Print[n]], {n, 0, 30000}] (* Robert G. Wilson v, Oct 15 2004 *)
  • PARI
    for(n=1,10^4,if(ispseudoprime(8*(10^n-1)/9+1),print1(n,", "))) \\ Derek Orr, Sep 06 2014

Formula

a(n) = A056663(n) + 1.

Extensions

Four missing terms (9812, 12260, 12341, 13760) added, and a(12)-a(14) added from Kamada data, by Robert Price, Sep 06 2014

A096507 Numbers k such that 6*R_k + 1 is a prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

1, 2, 6, 8, 9, 11, 20, 23, 41, 63, 66, 119, 122, 149, 252, 284, 305, 592, 746, 875, 1204, 1364, 2240, 2403, 5106, 5776, 5813, 12456, 14235, 39606, 55544, 84239, 275922
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Comments

Also numbers k such that (2*10^k + 1)/3 is prime.
These numbers form a near-repdigit sequence (6)w7.
All the terms from k = 2403 through 14235 correspond to primes. - Joao da Silva (zxawyh66(AT)yahoo.com), Oct 03 2005

Examples

			k = 9 gives 2000000001/3 = 666666667, which is prime.
k = 20 gives 66666666666666666667, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 2500, PrimeQ[FromDigits@ Table[6, {#}] + 1] &] (* or *)
    Select[Range@ 2500, PrimeQ[2 (10^# - 1)/3 + 1] &] (* Michael De Vlieger, Jul 04 2016 *)

Formula

a(n) = A056657(n) + 1.

Extensions

More terms from Julien Peter Benney (jpbenney(AT)ftml.net), Sep 14 2004
39606 and 55544 from Serge Batalov, Jun 2009
84239 from Serge Batalov, Jul 06 2009 confirmed as next term by Ray Chandler, Feb 23 2012
a(33) from Kamada data by Tyler Busby, Apr 14 2024

A096506 Numbers n for which 2*R_n + 1 is a prime, where R_n = 11...1 is the repunit (A002275) of length n.

Original entry on oeis.org

1, 2, 3, 8, 11, 36, 95, 101, 128, 260, 351, 467, 645, 1011, 1178, 1217, 2442, 3761, 3806, 15617, 26459, 63117, 88545, 93497
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Comments

Also numbers n such that (2*10^n + 7)/9 is prime.
Per Kamada link, 181457, 202059, 262874 are also terms, found by Rytis Slatkevicius. - Michael S. Branicky, Sep 13 2024

Examples

			n=36: 222222222222222222222222222222222223 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 2(10^n - 1)/9 + 1], Print[n]], {n, 7000}] (* Robert G. Wilson v, Oct 14 2004 *)

Formula

a(n) = A056656(n) + 1.

Extensions

a(20)-a(24) from Kamada link by Ray Chandler, Feb 27 2012

A096841 Numbers n such that sum of divisors of these numbers gives a decimal repdigit.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 43, 146, 365, 438, 443, 803, 887, 2221, 4442, 6663, 8887, 87876, 88183, 153837, 250244, 285597, 292860, 296294, 302877, 307674, 344268, 351612, 380718, 403398, 423260, 441821, 444443, 550238, 579038, 584438, 588974, 593163, 600363
Offset: 1

Views

Author

Labos Elemer, Jul 15 2004

Keywords

Examples

			n=43:sigma[43]=44; regular solutions:repdigit-1=prime.
		

Crossrefs

Programs

  • Mathematica
    rd[x_] := Length[Union[IntegerDigits[x]]] Do[s = rd[DivisorSigma[1, n]]; s1 = DivisorSigma[1, n]; If[Equal[s, 1], Print[{n, s1}]; ta[[u]] = n; u = u + 1], {n, 1, 1000000}];ta;DivisorSigma[1, ta]
    Select[Range[650000],Length[Union[IntegerDigits[DivisorSigma[1,#]]]]==1&] (* Harvey P. Dale, May 11 2019 *)

A116018 Numbers n such that n + phi(n) is a repdigit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 17, 21, 63, 167, 201, 389, 603, 1667, 3795, 3889, 4465, 5926, 50394, 166667, 510042, 2000001, 3888889, 5185194, 5798663, 5925926, 6000003, 32050435, 200000001, 335447667, 365110755, 444766346, 600000003, 1558138862, 1565408702, 1587424430
Offset: 1

Views

Author

Giovanni Resta, Feb 13 2006

Keywords

Comments

(I). If p=(2*10^(3n+1)+7)/27 is prime then m=2p is in the sequence because m+phi(m)=3p-1=2*(10^(3n+1)-1)/9 is a repdigit number. m=2*(2*10^811+7)/27 (a 811-digit number) is the smallest such terms and the next such terms has 4219 digits. - Farideh Firoozbakht, Aug 24 2006
(II). If p=(8*10^(3n+1)+1)/27 is prime then m=2p is in the sequence because m+phi(m)=8*(10^(3n+1)-1)/9 is a repdigit number. 5926 is the smallest such terms. - Farideh Firoozbakht, Aug 24 2006
(III). If p=(2*10^n+1)/3 then both numbers 3p & 9p are in the sequence because 3p+phi(3p)=5p-2=3*(10^(n+1)-1)/9 & 9p+ phi(9p)=9*(10^(n+1)-1)/9 are repdigit numbers. 21 & 63 are the smallest such terms. - Farideh Firoozbakht, Aug 24 2006
(IV). All primes p of the form (35*10^n+1)/9 are in the sequence because p+phi(p)=7*(10^n-1)/9 is a repdigit number. 389 is the smallest such terms. - Farideh Firoozbakht, Aug 24 2006
(V). All primes p of the form (10^n+2)/6 are in the sequence because p+phi(p)=2p-1=3*(10^n-1)/9 is a repdigit number. 2, 17 & 167 are such terms. - Farideh Firoozbakht, Aug 24 2006, Dec 19 2007

Examples

			5185194 + phi(5185194) = 6666666.
		

Crossrefs

Programs

  • PARI
    for(n=1,10^9,d=digits(n+eulerphi(n));if(vecmin(d)==vecmax(d),print1(n,", "))) \\ Derek Orr, Aug 11 2014
  • Python
    from sympy import totient
    A116018 = [n for n in range(1,10**6) if len(set(str(n+totient(n)))) == 1] # Chai Wah Wu, Aug 11 2014
    

Extensions

More terms from Farideh Firoozbakht, Aug 24 2006
a(35)-a(36) from Donovan Johnson, Feb 19 2013

A084832 Numbers k such that 2*R_k - 1 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

4, 18, 100, 121, 244, 546, 631, 1494, 2566, 8088, 262603, 282948, 359860
Offset: 1

Views

Author

Jason Earls, Jun 05 2003

Keywords

Comments

Also numbers k such that (2*10^k-11)/9 is prime.
Larger values correspond to strong pseudoprimes.
a(11) > 10^5. - Robert Price, Sep 06 2014

Examples

			a(1) = 4 because 2*(10^4-1)/9-1 = 2221 is prime.
a(2) = 18 means that 222222222222222221 is prime.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(2*(10^t-1)/9-1),[$1..1000]); # Robert Israel, Sep 07 2014
  • Mathematica
    Do[ If[ PrimeQ[2(10^n - 1)/9 - 1], Print[n]], {n, 0, 7000}] (* Robert G. Wilson v, Oct 14 2004; fixed by Derek Orr, Sep 06 2014 *)
  • PARI
    for(n=1, 10^4, if(ispseudoprime(2*(10^n-1)/9-1), print1(n,", "))) \\ Derek Orr, Sep 06 2014
    
  • Python
    from sympy import isprime
    def afind(limit):
      n, twoRn = 1, 2
      for n in range(1, limit+1):
        if isprime(twoRn-1): print(n, end=", ")
        twoRn = 10*twoRn + 2
    afind(700) # Michael S. Branicky, Apr 18 2021

Formula

a(n) = A056660(n) + 1.

Extensions

a(8) from Labos Elemer, Jul 15 2004
a(10) from Kamada data by Robert Price, Sep 06 2014
a(11)-a(13) from Kamada data by Tyler Busby, Apr 29 2024

A096505 Primes of the form 1 + repdigit. Primes whose totient is a repdigit.

Original entry on oeis.org

3, 5, 7, 23, 67, 89, 223, 666667, 22222223, 66666667, 666666667, 22222222223, 66666666667, 88888888888889, 88888888888888889, 66666666666666666667, 66666666666666666666667, 88888888888888888888888888888888889, 222222222222222222222222222222222223
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Examples

			89 is a term since it is a prime, and its totient, 88, is a decimal repdigit.
		

Crossrefs

Programs

  • Mathematica
    s = {3, 5, 7}; Do[r = (10^k - 1)/9; Do[p = m * r + 1; If[PrimeQ[p], AppendTo[s, p]], {m, {2, 6, 8}}], {k, 2, 50}]; s (* Amiram Eldar, Jun 06 2024 *)

Extensions

a(19) from Amiram Eldar, Jun 06 2024

A098216 Nonprime numbers m for which cototient(m) is a decimal repdigit.

Original entry on oeis.org

1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 21, 25, 27, 30, 35, 49, 60, 86, 90, 93, 120, 121, 145, 159, 172, 175, 195, 231, 245, 253, 279, 291, 327, 365, 497, 535, 559, 693, 703, 737, 886, 979, 981, 993, 1037, 1111, 1121, 1411, 1457, 1517, 1617, 1772, 1774, 2047, 2059
Offset: 1

Views

Author

Labos Elemer, Oct 22 2004

Keywords

Comments

For any odd repdigit k, Goldbach's conjecture implies there are primes p, q with p + q = k + 1, and then (if p <> q) p*q is a term. - Robert Israel, Jul 26 2025

Examples

			For m=97002, m-totient(m)=66666.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t,x;
      t:= n - numtheory:-phi(n);
      if t = 1 then return false fi;
      x:= t mod 10;
      t = x * (10^(ilog10(t)+1)-1)/9
    end proc:
    select(filter, [$1..3000]); # Robert Israel, Jul 25 2025
  • Mathematica
    ta={{0}};Do[s=Length[Union[IntegerDigits[n-EulerPhi[n]]]]; If[Equal[s, 1]&&!PrimeQ[n], Print[{n, n-EulerPhi[n]}];ta=Append[ta, n]], {n, 1, 100000}];ta=Delete[ta, 1];ta-EulerPhi[ta]

A096845 Numbers n for which 4*R_n - 1 is a prime, where R_n = 11...1 is the repunit (A002275) of length n.

Original entry on oeis.org

1, 2, 3, 6, 9, 12, 30, 32, 183, 297, 492, 41316
Offset: 1

Views

Author

Labos Elemer, Jul 15 2004

Keywords

Comments

Also numbers n such that (4*10^n-13)/9 is prime.
a(13) > 10^5. - Robert Price, Oct 25 2014

Examples

			n=30 means that 444444444444444444444444444443 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 4(10^n - 1)/9 - 1], Print[n]], {n, 5000}] (* Robert G. Wilson v, Oct 14 2004 *)
    Select[Range[500],PrimeQ[FromDigits[PadLeft[{3},#,4]]]&] (* The program generates the first 11 terms of the sequence. *) (* Harvey P. Dale, Feb 10 2022 *)

Formula

a(n) = A056661(n) + 1.

Extensions

a(12) from Robert Price, Oct 25 2014
Showing 1-10 of 16 results. Next