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.

Previous Showing 31-40 of 288 results. Next

A199684 a(n) = 4*10^n+1.

Original entry on oeis.org

5, 41, 401, 4001, 40001, 400001, 4000001, 40000001, 400000001, 4000000001, 40000000001, 400000000001, 4000000000001, 40000000000001, 400000000000001, 4000000000000001, 40000000000000001, 400000000000000001, 4000000000000000001
Offset: 0

Views

Author

Vincenzo Librandi, Nov 09 2011

Keywords

Crossrefs

Programs

  • Magma
    [4*10^n+1: n in [0..30]];

Formula

a(n) = 10*a(n-1)-9.
a(n) = 11*a(n-1)-10*a(n-2).
G.f.: (5-14*x)/((1-x)*(1-10*x)).
E.g.f.: exp(x) + 4*exp(10*x). - Stefano Spezia, Oct 20 2022

A258372 Smallest nonnegative number k not starting or ending with the digit 1 that forms a prime when it is sandwiched between n ones to the left of k and n ones to the right of k.

Original entry on oeis.org

0, 3, 4, 8, 36, 8, 5, 72, 28, 6, 79, 212, 23, 6, 73, 24, 52, 62, 3, 28, 220, 53, 75, 58, 228, 9, 265, 89, 214, 86, 215, 4, 7, 39, 295, 40, 87, 216, 97, 6, 264, 53, 287, 223, 4, 239, 259, 25, 57, 364, 49, 38, 93, 86, 27, 30, 80, 24, 6, 356, 50, 645, 395, 206
Offset: 1

Views

Author

Felix Fröhlich, May 28 2015

Keywords

Comments

n = 1 is the only case where a(n) = 0, since for any n > 1, A138148(n) is divisible by A002275(n).
No n exists such that a(n) = 2, since any number of the form A100706(n)+A011557(n) is of the form A000533(n)*A002275(n+1) (see comment by Robert Israel in A107123).
a(n) = 3 iff n is in A107123.
a(n) = 4 iff n is in A107124.
If k has an even number of digits and is a multiple of 11, then k is not a term. If k = (10^r+1)(10^m-1)/9 for some m > 0, r >= 0, then k is not a term. If A272232(k) = 0, then k is not a term. - Chai Wah Wu, Nov 08 2019

Examples

			a(1) = 0, because 101 is prime.
a(5) = 36, because the smallest x >= 0 such that 11111_x_11111 (where '_' denotes concatenation) is prime is 36. The decimal expansion of that prime is 111113611111.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; s = Table[1, {n}]; While[Or[!PrimeQ[FromDigits[s ~Join~ IntegerDigits[k] ~Join~ s]], Or[First@ IntegerDigits@ k == 1, Last@ IntegerDigits@ k == 1]], k++]; k, {n, 64}] (* Michael De Vlieger, May 28 2015 *)
  • PARI
    a000042(n) = (10^n-1)/9
    a(n) = my(k=0); while(k==10 || k%10==1 || k\(10^(#Str(k)-1))==1 || !ispseudoprime(eval(Str(a000042(n), k, a000042(n)))), k++); k

A261544 a(n) = Sum_{k=0..n} 1000^k.

Original entry on oeis.org

1, 1001, 1001001, 1001001001, 1001001001001, 1001001001001001, 1001001001001001001, 1001001001001001001001, 1001001001001001001001001, 1001001001001001001001001001, 1001001001001001001001001001001, 1001001001001001001001001001001001
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 24 2015

Keywords

Comments

A sequence of palindromic numbers.

Examples

			From _Bruno Berselli_, Aug 25 2015: (Start)
a(n)   is the binary representation of    A023001
-------------------------------------------------
1  ...........................................  1
1001  ........................................  9
1001001 .....................................  73
1001001001  ................................  585
1001001001001  ............................  4681
1001001001001001  ........................  37449
1001001001001001001  ....................  299593
1001001001001001001001  ................  2396745
1001001001001001001001001  ............  19173961, etc.
(End)
		

Crossrefs

Subsequence of A033146.
Sums of 100^k: A094028; sums of 10^k: A000042.
Cf. similar sequences of the form (k^n-1)/(k-1) listed in A269025.

Programs

  • Magma
    [(1000^(n+1)-1)/999: n in [0..30]]; // Vincenzo Librandi, Aug 24 2015
  • Mathematica
    Table[(1000^(n + 1) - 1)/999, {n, 0, 15}]
    LinearRecurrence[{1001, -1000}, {1, 1001}, 20] (* Vincenzo Librandi, Aug 24 2015 *)
  • PARI
    Vec(1 / ((x-1)*(1000*x-1)) + O(x^20)) \\ Colin Barker, Aug 24 2015
    

Formula

a(n) = (1000^(n + 1) - 1)/999.
a(n) = 1001*a(n-1) - 1000*a(n-2). - Colin Barker, Aug 24 2015
G.f.: 1 / ((x-1)*(1000*x-1)). - Colin Barker, Aug 24 2015
E.g.f.: (1/999)*(1000000*exp(1000*x) - exp(x)). - G. C. Greubel, Aug 29 2015

A348487 Positive numbers whose square starts and ends with exactly one 1.

Original entry on oeis.org

1, 11, 39, 41, 101, 111, 119, 121, 129, 131, 139, 141, 319, 321, 329, 331, 349, 351, 359, 361, 369, 371, 379, 381, 389, 391, 399, 401, 409, 411, 419, 421, 429, 431, 439, 441, 1001, 1009, 1011, 1019, 1021, 1029, 1031, 1039, 1041, 1099, 1101, 1109, 1111, 1119, 1121, 1129, 1131, 1139
Offset: 1

Views

Author

Bernard Schott, Oct 21 2021

Keywords

Comments

When a square ends with 1, this square ends with exactly one 1.
Sequences A000533 and A253213 show that there are an infinity of terms. The square of their terms, for n >= 3, starts and ends with exactly one 1. Also, the numbers 119, 1119, 11119, ..., ((10^k + 71) / 9)^2, (k >= 3) are terms. The squares ((10^k + 71) / 9)^2, have the last digit 1 and because 12*10^(2*k - 3) < ((10^k + 71) / 9)^2 <13*10^(2*k - 3), for k >= 3, the squares ((10^k + 71) / 9)^2, k >= 4, start with 12. - Marius A. Burtea, Oct 21 2021

Examples

			39 is a term since 39^2 = 1521.
109 is not a term since 109^2 = 11881.
119 is a term since 119^2 = 14161.
		

Crossrefs

Cf. A045855, A090771, A253213, A273372 (squares ending with 1), A017281, A017377.
Cf. A000533, A253213 for n >= 2 (subsequences).
Subsequence of A305719.

Programs

  • Magma
    [1] cat [n:n in [2..1200]|Intseq(n*n)[1] eq 1 and Intseq(n*n)[#Intseq(n*n)] eq 1 and Intseq(n*n)[-1+#Intseq(n*n)] ne 1]; // Marius A. Burtea, Oct 21 2021
  • Mathematica
    Join[{1}, Select[Range[11, 1200], (d = IntegerDigits[#^2])[[1]] == d[[-1]] == 1 && d[[2]] != 1 &]] (* Amiram Eldar, Oct 21 2021 *)
  • PARI
    isok(k) = my(d=digits(sqr(k))); (d[1]==1) && (d[#d]==1) && if (#d>2, (d[2]!=1) && (d[#d-1]!=1), 1); \\ Michel Marcus, Oct 21 2021
    
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("1")) == len(s.lstrip("1")) == len(s)-1
    def aupto(N):
      r = takewhile(lambda x: x<=N, (10*i+d for i in count(0) for d in [1, 9]))
      return [k for k in r if ok(k)]
    print(aupto(1140)) # Michael S. Branicky, Oct 21 2021
    

A052035 Palindromic primes whose sum of squared digits is also prime.

Original entry on oeis.org

11, 101, 131, 191, 313, 353, 373, 797, 919, 10301, 11311, 12721, 13331, 13931, 14341, 14741, 16361, 17971, 18181, 19391, 30103, 30703, 33533, 71317, 71917, 74747, 75557, 76367, 77977, 79397, 90709, 93139, 93739, 95959, 96769, 97379
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1999

Keywords

Comments

From Bernard Schott, Oct 20 2021: (Start)
Except for 11, all terms have an odd number of digits.
Except for terms of the form 10^k+1, k >= 2, the middle digit is always odd; the unique known term of the form 10^k+1 for 2 <= k <= 100000 is 101 (see comment in A000533). (End)

Examples

			373 -> 3^2 + 7^2 + 3^2 = 67, which is prime.
		

References

  • Charles W. Trigg, Journal of Recreational Mathematics, Vol. 20(2), 1988.

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range[2, 10^4], And[PalindromeQ@ #, PrimeQ@ Total[IntegerDigits[#]^2]] &] (* Michael De Vlieger, Oct 20 2021 *)
  • PARI
    isok(p) = my(d=digits(p)); isprime(p) && (d==Vecrev(d)) && isprime(sum(k=1, #d, d[k]^2)); \\ Michel Marcus, Oct 17 2021
    
  • Python
    from sympy import isprime
    def ok(n):
        s = str(n)
        return s==s[::-1] and isprime(n) and isprime(sum(int(d)**2 for d in s))
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Nov 23 2021
    
  • Python
    # second version for going to large terms
    from sympy import isprime
    from itertools import product
    def ok(pal):
        return isprime(pal) and isprime(sum(int(d)**2 for d in str(pal)))
    def agentod(maxdigs):
        yield 11
        for d in range(3, maxdigs+1, 2):
            pal = 10**(d-1) + 1
            if ok(pal): yield pal
            for first in "1379":
                for left in product("0123456789", repeat=(d-3)//2):
                    left = "".join(left)
                    for mid in "13579":
                        pal = int(first + left + mid + left[::-1] + first)
                        if ok(pal): yield pal
    print([an for an in agentod(5)]) # Michael S. Branicky, Nov 23 2021

A056251 Indices of primes in sequence defined by A(0) = 33, A(n) = 10*A(n-1) - 17 for n > 0.

Original entry on oeis.org

1, 11, 13, 29, 103, 125, 341, 599, 9823
Offset: 1

Views

Author

Robert G. Wilson v, Aug 18 2000

Keywords

Comments

Numbers n such that (280*10^n + 17)/9 is prime.
Numbers n such that digit 3 followed by n >= 0 occurrences of digit 1 followed by digit 3 is prime.
Numbers corresponding to terms <= 599 are certified primes.
All terms are odd since 11 is the only palindromic prime with an even number of digits. - Chai Wah Wu, Nov 05 2019
a(10) > 2*10^5. - Tyler Busby, Feb 01 2023

Examples

			313 is prime, hence 1 is a term.
		

References

  • Klaus Brockhaus and Walter Oberschelp, Zahlenfolgen mit homogenem Ziffernkern, MNU 59/8 (2006), pp. 462-467.

Crossrefs

Programs

Formula

a(n) = A082704(n) - 2.

Extensions

Additional comments from Klaus Brockhaus and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Dec 20 2004
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 15 2007
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 02 2008
Added and updated the links section, by Patrick De Geest, Nov 02 2014
Edited by Ray Chandler, Nov 04 2014

A056265 Indices of primes in sequence defined by A(0) = 99, A(n) = 10*A(n-1) - 61 for n > 0.

Original entry on oeis.org

1, 5, 11, 109, 3607, 37783
Offset: 1

Views

Author

Robert G. Wilson v, Aug 18 2000

Keywords

Comments

Numbers n such that (830*10^n + 61)/9 is prime. - Klaus Brockhaus and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Nov 27 2004
Numbers n such that digit 9 followed by n >= 0 occurrences of digit 2 followed by digit 9 is prime.
Numbers corresponding to terms <= 3607 are certified primes. For number corresponding to 37783 see P. De Geest, PDP Reference Table.

Examples

			9222229 is prime, hence 5 is a term.
		

References

  • Klaus Brockhaus and Walter Oberschelp, Zahlenfolgen mit homogenem Ziffernkern, MNU 59/8 (2006), pp. 462-467.

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] | IsPrime((830*10^n + 61) div 9)]; // Vincenzo Librandi, Nov 02 2014
  • Mathematica
    Do[If[PrimeQ[(9*10^n + 2*(10^n - 1)/9)*10 + 9], Print[n]], {n, 1, 2500}]
    Select[Range[2000], PrimeQ[(830 10^# + 61) / 9] &] (* Vincenzo Librandi, Nov 02 2014 *)
  • PARI
    a=99;for(n=0,1000,if(isprime(a),print1(n,","));a=10*a-61) \\ Klaus Brockhaus and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Nov 27 2004
    
  • PARI
    for(n=0,1000,if(isprime((830*10^n + 61)/9),print1(n,","))) \\ Klaus Brockhaus and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Nov 27 2004
    

Formula

a(n) = A082718(n) - 2.

Extensions

3607 from Klaus Brockhaus and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Nov 27 2004
37783 from Patrick De Geest, Jun 26 2005
Edited by N. J. A. Sloane, Jan 14 2008
Edited by Ray Chandler, Oct 20 2010
Comments section edited by Patrick De Geest, Nov 02 2014
Editied by Ray Chandler, Nov 05 2014

A056810 Numbers whose fourth power is a palindrome.

Original entry on oeis.org

0, 1, 11, 101, 1001, 10001, 100001, 1000001, 10000001, 100000001, 1000000001, 10000000001, 100000000001
Offset: 1

Views

Author

Robert G. Wilson v, Aug 21 2000

Keywords

Comments

Suppose a number is of the form a=10...01 (see A000533) then a^2=10..020..01, so a^2 is always a palindrome. a^3=10..030..030..01, so a^3 is always a palindrome. Similarly we also have a^4=10..040..060..040..01, so a^4 is always a palindrome. However, a^5 is in general not a palindrome, for example 101^5=10510100501. - Dmitry Kamenetsky, Apr 17 2009
The sequence contains no term with digit sum 3. - Vladimir Shevelev, May 23 2011. Proof: There are four possibilities for n:
1) 1+10^k+10^m, 00, 3) 2+10^s, s>0, 4) 3*10^t, t>=0.
In the last two cases n^4 is trivially not a palindrome.
For r>=2, in the second case we have n^4 = (1 + 2*10^r)^4 = 1 + 8*10^r + 4*10^(2*r) + 2*10^(2*r + 1) + 2*10^(3*r) + 3*10^(3*r + 1) + 6*10^(4*r) + 10^(4*r + 1)
which cannot be a palindrome.
If r=1, we have 1+8*10+...9*10^4+10^5 which also is not a palindrome.
The proof for the first case is similar. QED - Vladimir Shevelev, Oct 24 2015
Does every term have the structure 100...0001? Referring to the Simmons (1972) paper, we can also ask, if n is a number whose cube is a palindrome in base 4, must the base-4 expansion of n have the form 100...0001? - N. J. A. Sloane, Oct 22 2015

Crossrefs

Cf. A186080.

Programs

  • Mathematica
    palQ[n_] := Block[{}, Reverse[idn = IntegerDigits@ n] == idn]; k = 0; lst = {}; While[k < 1000000002, If[ palQ[k^4], AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Oct 23 2015 *)
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def afind(limit):
        for k in range(limit+1):
            if ispal(k**4): print(k, end=", ")
    afind(10000001) # Michael S. Branicky, Sep 05 2021

Extensions

a(11) from Robert G. Wilson v, Oct 23 2015
a(12)-a(13) from Michael S. Branicky, Sep 05 2021

A088265 Numbers of the form 10^k + 1, 3, 7, or 9 for k>=1.

Original entry on oeis.org

11, 13, 17, 19, 101, 103, 107, 109, 1001, 1003, 1007, 1009, 10001, 10003, 10007, 10009, 100001, 100003, 100007, 100009, 1000001, 1000003, 1000007, 1000009, 10000001, 10000003, 10000007, 10000009, 100000001, 100000003, 100000007, 100000009, 1000000001, 1000000003, 1000000007, 1000000009
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2003

Keywords

Comments

A 10-automatic sequence: terms match the regular expression 10*[1379]. - Charles R Greathouse IV, Oct 15 2012
Primes in the sequence are at positions 1 to 8, 12, 15, 16, 18, 22, 31, 35, 36, 42, 66, 70, 72, 88, 95,... R. J. Mathar, Oct 16 2012

Crossrefs

Programs

  • Maple
    A088265 := proc(n)
        if n <=8 then
            op(n,[11,13,17,19,101,103,107,109]) ;
        else
            11*procname(n-4)-10*procname(n-8) ;
        end if;
    end proc: # R. J. Mathar, Oct 16 2012
  • Mathematica
    Flatten @ Table[10^n + m, {n, 50}, {m, {1, 3, 7, 9}}] (* Mikk Heidemaa, Mar 06 2020 *)
  • PARI
    A088265(n)=10^((n+3)\4)+[9,1,3,7][n%4+1]  \\ M. F. Hasler, Oct 15 2012

Formula

a(4n+r) = 10^(n+1) + k, (r, k) = (1, 1), (2, 3), (3, 7) or (4, 9).
G.f. -x*(-11-13*x-17*x^2-19*x^3+20*x^4+40*x^5+80*x^6+100*x^7) / ( (x-1)*(1+x)*(1+x^2)*(10*x^4-1) ). a(n)= 11*a(n-4) -10*a(n-8). - R. J. Mathar, Oct 16 2012

Extensions

More terms from Max Alekseyev, Oct 14 2012

A101155 Indices of primes in sequence defined by A(0) = 73, A(n) = 10*A(n-1) + 63 for n > 0.

Original entry on oeis.org

0, 2, 4, 5, 9, 11, 12, 38, 47, 53, 63, 81, 146, 147, 359, 398, 1637, 1875, 2145, 2193, 15788, 23073, 38465, 68399
Offset: 1

Views

Author

Klaus Brockhaus and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Dec 03 2004

Keywords

Comments

Numbers n such that (720*10^n - 63)/9 is prime.
Numbers n such that digit 7 followed by n >= 0 occurrences of digit 9 followed by digit 3 is prime.
Numbers corresponding to terms <= 398 are certified primes.
a(25) > 2*10^5. - Robert Price, Nov 11 2015

Examples

			7999993 is prime, hence 5 is a term.
		

References

  • Klaus Brockhaus and Walter Oberschelp, Zahlenfolgen mit homogenem Ziffernkern, MNU 59/8 (2006), pp. 462-467.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 100000], PrimeQ[(720*10^# - 63)/9] &] (* Robert Price, Nov 11 2015 *)
  • PARI
    a=73;for(n=0,1000,if(isprime(a),print1(n,","));a=10*a+63)
    
  • PARI
    for(n=0,1000,if(isprime((720*10^n-63)/9),print1(n,",")))

Formula

a(n) = A099190(n) - 1.

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 01 2008
a(21)-a(24) from Kamada data by Ray Chandler, Apr 30 2015
Previous Showing 31-40 of 288 results. Next