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 15 results. Next

A096503 Euler-phi of these numbers is a decimal repdigit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 23, 24, 30, 46, 67, 69, 89, 92, 115, 134, 138, 178, 184, 223, 230, 276, 446, 669, 892, 1043, 1115, 1338, 1341, 1784, 2086, 2230, 2676, 2682, 446669, 666667, 893338, 895043, 902423, 1333334, 1340007, 1786676
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Examples

			n=88888892, A000010(n)=44444444.
Regular solutions: if x=repdigit+1 is prime, then phi[x]=repdigit (see A028988).
		

Crossrefs

Programs

  • Mathematica
    Needs["CNT`"]; t = {PhiInverse[1]}; Do[n = FromDigits[Table[i, {j}]]; AppendTo[t, PhiInverse[n]], {j, 18}, {i, 2, 8, 2}]; t2 = Union[Flatten[t]]; t (* T. D. Noe, Feb 25 2014 *)
    Select[Range[2*10^5], Length@ Union@ IntegerDigits@ EulerPhi@ # == 1 &] (* Michael De Vlieger, Jul 02 2016 *)
  • PARI
    isok(n) = d = digits(eulerphi(n)); vecmin(d) == vecmax(d); \\ Michel Marcus, Feb 25 2014

A048328 Numbers that are repdigits in base 3.

Original entry on oeis.org

0, 1, 2, 4, 8, 13, 26, 40, 80, 121, 242, 364, 728, 1093, 2186, 3280, 6560, 9841, 19682, 29524, 59048, 88573, 177146, 265720, 531440, 797161, 1594322, 2391484, 4782968, 7174453, 14348906, 21523360, 43046720, 64570081, 129140162, 193710244, 387420488, 581130733
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Comments

Case for base 2 see A000225: 2^n - 1.
If the sequence b(n) represents the number of paths of length n, n >= 1, starting at node 1 and ending at nodes 1, 2, 3 and 4 on the path graph P_5 then a(n-1) = b(n) - 1. - Johannes W. Meijer, May 29 2010

Crossrefs

Programs

  • Maple
    nmax := 35; a(0) := 0: for n from 1 to nmax do a(2*n) := a(2*n-2) + 2*3^(n-1); od: a(1) := 1: for n from 1 to nmax do a(2*n+1) := 1*a(2*n-1) + 3^n; od: seq(a(n), n=0..nmax);
    # End program 1
    with(GraphTheory): G := PathGraph(5): A:= AdjacencyMatrix(G): nmax := nmax; for n from 1 to nmax+1 do B(n) := A^n; b(n) := add(B(n)[1, k], k=1..4); a1(n-1) := b(n)-1; od: seq(a1(n), n=0..nmax);
    # End program 2
    # From Johannes W. Meijer, May 29 2010, revised Sep 23 2012
    # third Maple program:
    a:= n->(<<0|1>, <-3|4>>^iquo(n, 2, 'r').`if`(r=0, <<0, 2>>, <<1, 4>>))[1, 1]:
    seq (a(n), n=0..60);  # Alois P. Heinz, Sep 23 2012
  • Mathematica
    Rest[FromDigits[#, 3]&/@Flatten[Table[{PadRight[{1}, n, 1], PadRight[{2}, n, 2]}, {n, 0, 20}], 1]] (* Harvey P. Dale, Feb 03 2011 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -3,0,4,0]^n*[0;1;2;4])[1,1] \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (2*x^2+x)/(1-4*x^2+3*x^4). - Alois P. Heinz, Sep 23 2012
Sum_{n>=1} 1/a(n) = 3 * A214369 = 2.04646050781571420028... - Amiram Eldar, Jan 21 2022
a(n) = (3^(n/2)*(sqrt(3) + 2 - (-1)^n*(sqrt(3) - 2)) - 3 - (-1)^n)/4. - Stefano Spezia, Feb 18 2022

A054268 Sum of composite numbers between prime p and nextprime(p) is a repdigit.

Original entry on oeis.org

3, 5, 109, 111111109, 259259257
Offset: 1

Views

Author

Patrick De Geest, Apr 15 2000

Keywords

Comments

No additional terms below 472882027.
No additional terms below 10^58. - Chai Wah Wu, Jun 01 2024

Examples

			a(5) is ok since between 259259257 and nextprime 259259261 we get the sum 259259258 + 259259259 + 259259260 which yield repdigit 777777777.
		

Crossrefs

Programs

  • Mathematica
    repQ[n_]:=Count[DigitCount[n],0]==9; Select[Prime[Range[2,14500000]], repQ[Total[Range[#+1,NextPrime[#]-1]]]&] (* Harvey P. Dale, Jan 29 2011 *)
  • Python
    from sympy import prime
    A054268 = [prime(n) for n in range(2,10**5) if len(set(str(int((prime(n+1)-prime(n)-1)*(prime(n+1)+prime(n))/2)))) == 1]
    # Chai Wah Wu, Aug 12 2014
    
  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    from sympy.abc import x,y
    from sympy.solvers.diophantine.diophantine import diop_quadratic
    def A054268_gen(): # generator of terms
        for l in count(1):
            c = []
            for m in range(1,10):
                k = m*(10**l-1)//9<<1
                for a, b in diop_quadratic((x-y-1)*(x+y)-k):
                    if isprime(b) and a == nextprime(b):
                        c.append(b)
            yield from sorted(c)
    A054268_list = list(islice(A054268_gen(),5)) # Chai Wah Wu, Jun 01 2024

Formula

Numbers A000040(n) for n > 1 such that A001043(n)*(A001223(n)-1)/2 is in A010785. - Chai Wah Wu, Aug 12 2014

Extensions

Offset changed by Andrew Howroyd, Aug 14 2024

A048329 Numbers that are repdigits in base 4.

Original entry on oeis.org

0, 1, 2, 3, 5, 10, 15, 21, 42, 63, 85, 170, 255, 341, 682, 1023, 1365, 2730, 4095, 5461, 10922, 16383, 21845, 43690, 65535, 87381, 174762, 262143, 349525, 699050, 1048575, 1398101, 2796202, 4194303, 5592405, 11184810, 16777215, 22369621, 44739242, 67108863
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			10_10 = 22_4, 15_10 = 33_4, 5461_10 = 1111111_4.
		

Crossrefs

Base 4 repdigits 1,2,3 (trisections): A002450, A020988, A024036.

Programs

  • Magma
    [0] cat  [k:k in [1..10^7]| #Set(Intseq(k,4)) eq 1]; // Marius A. Burtea, Oct 11 2019
  • Maple
    a:= n-> (1+irem(n+2, 3))*(4^iquo(n+2,3)-1)/3:
    seq(a(n), n = 0..45);
  • Mathematica
    Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 4], {n, 0, 40}, {d, 3}]]](* Vincenzo Librandi, Feb 06 2014 *)
    LinearRecurrence[{0,0,5,0,0,-4},{0,1,2,3,5,10},40] (* Harvey P. Dale, Jul 11 2023 *)

Formula

G.f.: x*(1+2*x+3*x^2) / ( (x-1)*(4*x^3-1)*(1+x+x^2) ) with a(n) = 5*a(n-3) - 4*a(n-6). - R. J. Mathar, Mar 15 2015
Sum_{n>=1} 1/a(n) = (11/2) * A248721 = 2.31603727318383077512... - Amiram Eldar, Jan 21 2022

A048333 Numbers that are repdigits in base 8.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 18, 27, 36, 45, 54, 63, 73, 146, 219, 292, 365, 438, 511, 585, 1170, 1755, 2340, 2925, 3510, 4095, 4681, 9362, 14043, 18724, 23405, 28086, 32767, 37449, 74898, 112347, 149796, 187245, 224694, 262143, 299593, 599186, 898779
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Comments

For the general case, the sequence of numbers that are repdigits in base b > 1 satisfies the recurrence a(n) = (b+1)*a(n-b+1) - b*a(n-2*(b-1)) for n >= 2(b-1) with g.f.: (sum_{1 <= i < b} i*x^i)/(1 - (b+1)*x^(b-1) + bx^(2(b-1))). - Chai Wah Wu, May 30 2016

Crossrefs

Programs

  • Mathematica
    Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 8], {n, 0, 40}, {d, 7}]]] (* Vincenzo Librandi, Feb 06 2014 *)
    LinearRecurrence[{0,0,0,0,0,0,9,0,0,0,0,0,0,-8},{0,1,2,3,4,5,6,7,9,18,27,36,45,54},50] (* Harvey P. Dale, Dec 09 2018 *)
  • PARI
    is(n)=#Set(digits(n,8))==1 \\ Charles R Greathouse IV, Feb 15 2017

Formula

From Chai Wah Wu, May 30 2016: (Start)
a(n) = 9*a(n-7) - 8*a(n-14) for n > 13.
G.f.: x*(7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(8*x^14 - 9*x^7 + 1). (End)
Sum_{n>=1} 1/a(n) = (363/20) * A248725 = 2.92153624531838250201... - Amiram Eldar, Jan 21 2022

Extensions

Changed offset from 1 to 0 by Vincenzo Librandi, Feb 06 2014

A048330 Numbers that are repdigits in base 5.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 12, 18, 24, 31, 62, 93, 124, 156, 312, 468, 624, 781, 1562, 2343, 3124, 3906, 7812, 11718, 15624, 19531, 39062, 58593, 78124, 97656, 195312, 292968, 390624, 488281, 976562, 1464843, 1953124, 2441406, 4882812, 7324218, 9765624
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			12_10 = 22_5, 18_10 = 33_5, 7812_10 = 222222_5.
		

Crossrefs

Programs

  • Magma
    [0] cat [k:k in [1..10^7]| #Set(Intseq(k,5)) eq 1]; // Marius A. Burtea, Oct 11 2019
  • Mathematica
    Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 5], {n, 0, 40}, {d, 4}]]] (* Vincenzo Librandi, Feb 06 2014 *)

Formula

Conjecture: G.f.: x*(1+2*x+3*x^2+4*x^3) / ( (x-1)*(1+x)*(x^2+1)*(5*x^4-1) ) with a(n) = 6*a(n-4) - 5*a(n-8). - R. J. Mathar, Mar 15 2015
Sum_{n>=1} 1/a(n) = (25/3) * A248722 = 2.51444877998310381623... - Amiram Eldar, Jan 21 2022

Extensions

Offset changed from 1 to 0 by Vincenzo Librandi, Feb 06 2014

A048331 Numbers that are repdigits in base 6.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 14, 21, 28, 35, 43, 86, 129, 172, 215, 259, 518, 777, 1036, 1295, 1555, 3110, 4665, 6220, 7775, 9331, 18662, 27993, 37324, 46655, 55987, 111974, 167961, 223948, 279935, 335923, 671846, 1007769, 1343692, 1679615, 2015539
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			14_10 = 22_6, 21_10_ = 33_6, 9331_10_ = 111111_6.
		

Crossrefs

Programs

  • Magma
    [0] cat [k:k in [1..2*10^6]| #Set(Intseq(k,6)) eq 1]; // Marius A. Burtea, Oct 11 2019
  • Mathematica
    Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 6], {n, 0, 40}, {d, 5}]]] (* Vincenzo Librandi, Feb 06 2014 *)

Formula

Conjecture: G.f.: x*(1+2*x+3*x^2+4*x^3+5*x^4) / ( (x-1)*(x^4+x^3+x^2+x+1)*(6*x^5-1) ) with a(n) = 7*a(n-5) - 6*a(n-10). - R. J. Mathar, Mar 15 2015
Sum_{n>=1} 1/a(n) = (137/12) * A248723 = 2.67320256903907177403... - Amiram Eldar, Jan 21 2022

A048332 Numbers that are repdigits in base 7.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 16, 24, 32, 40, 48, 57, 114, 171, 228, 285, 342, 400, 800, 1200, 1600, 2000, 2400, 2801, 5602, 8403, 11204, 14005, 16806, 19608, 39216, 58824, 78432, 98040, 117648, 137257, 274514, 411771, 549028, 686285, 823542, 960800
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 7], {n, 0, 40}, {d, 6}]]] (* Vincenzo Librandi, Feb 06 2014 *)
    LinearRecurrence[{0,0,0,0,0,8,0,0,0,0,0,-7},{0, 1, 2, 3, 4, 5, 6, 8, 16, 24, 32, 40}, 25] (* G. C. Greubel, May 30 2016 *)
  • Python
    A048332_list = [0] + [int(d*l,7) for l in range(1,10) for d in '123456'] # Chai Wah Wu, May 30 2016

Formula

From Chai Wah Wu, May 30 2016: (Start)
a(n) = 8*a(n-6) - 7*a(n-12) for n > 11.
G.f.: x*(6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(7*x^12 - 8*x^6 + 1). (End)
a(n) = (n - 6*floor((n-1)/6))*(7^floor((n+5)/6) - 1)/6. - Ilya Gutkovskiy, May 30 2016
Sum_{n>=1} 1/a(n) = (147/10) * A248724 = 2.80637791743084519957... - Amiram Eldar, Jan 21 2022

A048334 Numbers that are repdigits in base 9.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 20, 30, 40, 50, 60, 70, 80, 91, 182, 273, 364, 455, 546, 637, 728, 820, 1640, 2460, 3280, 4100, 4920, 5740, 6560, 7381, 14762, 22143, 29524, 36905, 44286, 51667, 59048, 66430, 132860, 199290, 265720, 332150, 398580
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 9], {n, 0, 40}, {d, 8}]]] (* Vincenzo Librandi, Feb 06 2014 *)
    Table[FromDigits[IntegerDigits[(n-9*Floor[(n-1)/9])*(10^Floor[(n+8)/9]-1)/9],9],{n,0,50}] (* Zak Seidov, Mar 15 2015 *)
    f[n_] := Block[{r = FromDigits[#, 9] & /@ (Table[1, {#}] & /@ Range@ n)},
    Sort@ Flatten[Times[r, #] & /@ Range@ 8]]; f[6] (* Michael De Vlieger, Mar 15 2015 *)
    LinearRecurrence[{0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,-9},{0,1,2,3,4,5,6,7,8,10,20,30,40,50,60,70},47] (* Ray Chandler, Jul 15 2015 *)
  • PARI
    lista(nn) = for (n=0, nn, if ((n==0) || (#Set(digits(n, 9)) == 1), print1(n, ", "))); \\ Michel Marcus, Mar 17 2015

Formula

G.f.: x*(1+2*x+3*x^2+4*x^3+5*x^4+6*x^5+7*x^6+8*x^7) / ( (x-1) *(1+x) *(x^2+1) *(3*x^4-1) *(3*x^4+1) *(x^4+1) ). - R. J. Mathar, Mar 14 2015
a(n) = 10*a(n-8) -9*a(n-16). - R. J. Mathar, Mar 14 2015
Sum_{n>=1} 1/a(n) = (761/35) * A248726 = 3.02323812974071904119... - Amiram Eldar, Jan 21 2022

A048340 a(n) in base 16 is a repdigit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 273, 546, 819, 1092, 1365, 1638, 1911, 2184, 2457, 2730, 3003, 3276, 3549, 3822, 4095, 4369, 8738, 13107, 17476, 21845, 26214, 30583
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 16], {n, 0, 50}, {d, 15}]]] (* Vincenzo Librandi, Feb 06 2014 *)
  • Python
    A048340_list = [0] + [int(d*l,16) for l in range(1,10) for d in '123456789abcdef'] # Chai Wah Wu, May 30 2016

Formula

From Chai Wah Wu, May 30 2016: (Start)
a(n) = 17*a(n-15) - 16*a(n-30) for n > 29.
x*(15*x^14 + 14*x^13 + 13*x^12 + 12*x^11 + 11*x^10 + 10*x^9 + 9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(16*x^30 - 17*x^15 + 1).
(End)
a(n) = (n - 15*floor((n-1)/15))*(16^floor((n+14)/15) - 1)/15. - Ilya Gutkovskiy, May 30 2016
Showing 1-10 of 15 results. Next