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.

User: Giovanni Teofilatto

Giovanni Teofilatto's wiki page.

Giovanni Teofilatto has authored 647 sequences. Here are the ten most recent ones:

A271422 Concatenation of prime(n) and its square.

Original entry on oeis.org

24, 39, 525, 749, 11121, 13169, 17289, 19361, 23529, 29841, 31961, 371369, 411681, 431849, 472209, 532809, 593481, 613721, 674489, 715041, 735329, 796241, 836889, 897921, 979409, 10110201, 10310609, 10711449, 10911881, 11312769, 12716129, 13117161, 13718769
Offset: 1

Author

Giovanni Teofilatto, Jul 13 2016

Keywords

Comments

All concatenations are divisible by the n-th prime.
a(n)/prime(n) gives a number of the form concatenate[(10^k)_prime(n)] for some k.
Subsequence of A053061.
Except for 24 and 525, a(n) have final decimal digit 1 or 9.

Examples

			For n=4, prime(4) = 7 (the fourth prime number) and 7^2 = 49. These are concatenated to get a(4) = 749. - _Michael B. Porter_, Jul 16 2016
		

Crossrefs

Cf. A001248 (primes squared), A030078 (primes cubed), A053061, A038800 (number of primes between 10n and 10n+9).

Programs

  • Maple
    seq(n*(n+10^(1+ilog10(n^2))), n=select(k->isprime(k),[$1..137])); # Peter Luschny, Jul 16 2016
  • Mathematica
    Table[FromDigits@ Flatten@ Map[IntegerDigits, {#, #^2}] &@ Prime@ n, {n, 33}] (* Michael De Vlieger, Jul 13 2016 *)
  • PARI
    a(n) = eval(Str(prime(n), prime(n)^2)) \\ Felix Fröhlich, Jul 14 2016

Formula

a(n) = Concatenate [prime(n)_A001248(n)].
a(n) = p*(p+10^A055642(p^2)) with p = prime(n). - Peter Luschny, Jul 17 2016

A274321 Primes equal to a concatenation of a prime and a nonzero palindromic number.

Original entry on oeis.org

13, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 113, 131, 137, 139, 167, 173, 179, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 271, 277, 283, 293, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397, 419, 431, 433, 439
Offset: 1

Author

Giovanni Teofilatto, Jun 18 2016

Keywords

Crossrefs

Programs

  • PARI
    lista() = {my(l = List(), pal = vector(199,i,a2113(i)), pri = vector(primepi(10000)), t=0); forprime(i=2,10000,t++; pri[t]=i); for(i = 2, #pal, for(j=1,#pri, p = conc(pal[i], pri[j]); if(#digits(p) < 6, if(isprime(p), listput(l, p))); p = conc(pri[j], pal[i]); if(#digits(p) < 6, if(isprime(p), listput(l, p)))));listsort(l,1);l}a2113(n)={my(d, i, r); r=vector(#digits(n-10^(#digits(n\11)))+#digits(n\11)); n=n-10^(#digits(n\11)); d=digits(n); for(i=1, #d, r[i]=d[i]; r[#r+1-i]=d[i]); sum(i=1, #r, 10^(#r-i)*r[i])}
    a2113(n)={my(d, i, r); r=vector(#digits(n-10^(#digits(n\11)))+#digits(n\11)); n=n-10^(#digits(n\11)); d=digits(n); for(i=1, #d, r[i]=d[i]; r[#r+1-i]=d[i]); sum(i=1, #r, 10^(#r-i)*r[i])}
    conc(a, b) = {a * 10^(#digits(b)) + b} \\ David A. Corneth, Jun 18 2016
    
  • PARI
    ispal(n) = n && (eval(subst(Polrev(digits(n)), x, 10)) == n);
    isconc(n) = {d = digits(n); for (k=1, #d, na = n\10^k; nb = n % 10^k; if ((n == eval(concat(Str(na), Str(nb)))) && ((isprime(na) && ispal(nb)) || (isprime(nb) && ispal(na))), return(1)););}
    isok(n) = isprime(n) && isconc(n); \\ Michel Marcus, Jun 20 2016

A273906 Primes equal to the concatenation of two nonzero palindromic numbers.

Original entry on oeis.org

11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 113, 199, 211, 223, 227, 229, 233, 277, 311, 331, 337, 433, 443, 449, 499, 557, 577, 599, 661, 677, 733, 773, 811, 877, 881, 883, 887, 911, 977, 991, 997, 1013, 1019, 1117, 1151, 1171, 1181
Offset: 1

Author

Giovanni Teofilatto, Jun 03 2016

Keywords

Comments

The only palindrome in this sequence below 10^9 is 11 (per request of Giovanni Teofilatto). A004022 is a subsequence. - David A. Corneth, Jun 10 2016
If we have a concatenation of two palindromes A = A', B = B' which is palindromic, concat(A,B) =: A.B = (A.B)' = B'.A' = B.A, then A*(10^LB-1) = B*(10^LA-1) (LX = length of X) <=> A*R(LB) = B*R(LA), where R(n) = (10^n-1)/9. To have A.B prime we also must have gcd(A,B) = 1, thus A | R(LA) and B | R(LB). Such numbers are listed in A249647 (not A014950), the only palindromes there are of the form 1...1, 3...3 or 9...9. Thus the only palindromic terms in this sequence A273906 are the repunit primes A004022. - M. F. Hasler, Jun 10 2016

Examples

			The prime 1013 is a term since 101 and 3 are palindromic.
The prime 101 is not a term, since it is not a concatenation of two nonzero palindromic numbers.
The prime 131 is not a term because it is not a concatenation of two nonzero palindromic numbers.
		

Programs

  • Mathematica
    Take[#, 62] &@ Select[Sort@ Map[FromDigits@ Flatten@ IntegerDigits@ # &, Tuples[#, 2]], PrimeQ] &@ Select[Range[10^3], Reverse@ # == # &@ IntegerDigits@ # &] (* Michael De Vlieger, Jun 03 2016 *)
    nxtPal[n_]:=With[{c=Join[{2},Flatten[Table[{10*10^d,11*10^d},{d,0,10}]]]},SelectFirst[n+c,PalindromeQ]]; Take[Join[{11},Select[ #[[1]]*10^IntegerLength[ #[[2]]]+#[[2]]&/@ Flatten[{#,Reverse[#]}&/@Subsets[Join[Range[8],NestList[nxtPal,9,100]],{2}],1],PrimeQ]//Union],60] (* Harvey P. Dale, Dec 08 2024 *)
  • PARI
    \\ See program link from David A. Corneth, Jun 10 2016.

Formula

a(n) = A096489(n+1), n=1..21. - R. J. Mathar, Jun 12 2016. (This is a pure accident, I think, since A096489 is a finite sequence. - N. J. A. Sloane, Jun 12 2016)

Extensions

More terms from Michael De Vlieger, Jun 03 2016

A273892 Numbers starting with an even (decimal) digit.

Original entry on oeis.org

0, 2, 4, 6, 8, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219
Offset: 1

Author

Giovanni Teofilatto, Jun 02 2016

Keywords

Comments

For positive terms, a number is a term iff the first digit is even. Therefore, for k > 0, there are 4 * 10^(k - 1) terms having precisely k digits. - David A. Corneth, Jun 02 2016
Also numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 2. - Stefano Spezia, Jul 08 2025

Examples

			21 is a term because 2 is an even number. - _Altug Alkan_, Jun 02 2016
		

Crossrefs

Programs

  • Magma
    [0] cat [n: n in [1..220] | IsEven(Intseq(n)[#Intseq(n)])]; // Bruno Berselli, Jun 15 2016
  • Mathematica
    Select[Range[0, 219], EvenQ@ FromDigits@ Reverse@ IntegerDigits@ # &] (* or *) {0} ~ Join ~ Select[Range@ 219, EvenQ@ Floor[#/10^Floor@ Log10@ #] &] (* Michael De Vlieger, Jun 03 2016 *)
  • PARI
    A004086(n) = eval(concat(Vecrev(Str(n)))); lista(nn) = for(n=0, nn, if(A004086(n) % 2 == 0, print1(n, ", "))); \\ Altug Alkan, Jun 02 2016
    
  • PARI
    a(n)=if(n==1, return(0), n--; k = logint(9*n\4, 10)); n -= 4 * ((10^k - 1) / 9); n--; 2 * (n \ 10^k + 1)*10^k+n%10^k
    is(n) = n==0||digits(n)[1]%2==0 \\ David A. Corneth, Jun 02 2016
    

A273245 Non-palindromic binary numbers whose reversal is a palindrome.

Original entry on oeis.org

10, 100, 110, 1000, 1010, 1100, 1110, 10000, 10010, 10100, 11000, 11100, 11110, 100000, 100010, 100100, 101000, 101010, 110000, 110110, 111000, 111100, 111110, 1000000, 1000010, 1000100, 1001000, 1010000, 1010100, 1011010, 1100000, 1100110, 1101100, 1110000, 1111000, 1111100
Offset: 1

Author

Giovanni Teofilatto, May 18 2016

Keywords

Crossrefs

Cf. A006995, A273329, A272670 (this sequence written in base 10), A057890 (and divided by 2).

Programs

  • Maple
    # see A272670 for the other subroutines
    for n from 1 to 400 do
        if isA272670(n) then
            printf("%d,",A007088(n)) ;
        end if;
    end do: # R. J. Mathar, May 20 2016
  • Python
    A273245_list = [int(m) for m in (bin(n)[2:] for n in range(1,10**4)) if m != m[::-1] and m.rstrip('0') == m[::-1].lstrip('0')] # Chai Wah Wu, May 21 2016

Formula

Consists of binary palindromes (A006995) times nontrivial powers of 2, that is, 2^i, i>0. - N. J. A. Sloane, May 19 2016
a(n) = A007088(A272670(n)). - R. J. Mathar, May 20 2016

A273239 Non-palindromic numbers whose reversal is a palindrome.

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 200, 220, 300, 330, 400, 440, 500, 550, 600, 660, 700, 770, 800, 880, 900, 990, 1000, 1010, 1100, 1110, 1210, 1310, 1410, 1510, 1610, 1710, 1810, 1910, 2000, 2020, 2120, 2200, 2220, 2320, 2420, 2520, 2620, 2720, 2820, 2920
Offset: 1

Author

Giovanni Teofilatto, May 18 2016

Keywords

Comments

Subsequence of A118959. - Altug Alkan, May 18 2016

Crossrefs

Extensions

More terms from Altug Alkan, May 18 2016

A272550 Lexicographically earliest increasing sequence of primes such that odd-indexed terms have final digit 1 and even-indexed terms have final digit 9.

Original entry on oeis.org

11, 19, 31, 59, 61, 79, 101, 109, 131, 139, 151, 179, 181, 199, 211, 229, 241, 269, 271, 349, 401, 409, 421, 439, 461, 479, 491, 499, 521, 569, 571, 599, 601, 619, 631, 659, 661, 709, 751, 769, 811, 829, 881, 919, 941, 1009, 1021, 1039, 1051, 1069, 1091, 1109
Offset: 1

Author

Giovanni Teofilatto, May 11 2016

Keywords

Comments

a(n) + a(n+1) = 0 (mod 10) for all n >= 1.

Programs

  • Maple
    a:= proc(n) option remember; local p, d;
          if n=1 then p:= 11
        else p:= a(n-1); d:= `if`(n::odd, 1, 9);
             while irem(p, 10)<>d do p:=nextprime(p) od
          fi; p
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 11 2016
  • Mathematica
    a[1] = 11; a[n_] := a[n] = Block[{d, q = a[n-1]}, d=10-Mod[q,10]; While[ Mod[q = NextPrime@ q, 10] != d]; q]; Array[a, 30] (* Giovanni Resta, May 11 2016 *)

A267348 Decimal equivalents of terms of A266926 interpreted as binary numbers.

Original entry on oeis.org

0, 1, 2, 6, 54, 3510, 14380470, 241264265751990, 67909853583655146508751957430, 5380372916045726369002105219892285499516304666683458153910, 33773148168338125039096320085837383261496919374684668572527108632210618661283323381212228218472784834977109705977270
Offset: 1

Author

Giovanni Teofilatto, Jan 13 2016

Keywords

Comments

For n>1, a(n+1)/a(n) is an integer. Therefore, after 2, a(n) is divisible by 6.
The term a(12) has 925 decimal digits; a(13) has 1850 decimal digits. - Michael De Vlieger, Jan 13 2016

Crossrefs

Cf. A266926.

Programs

  • Mathematica
    a = {0, 1}; Do[AppendTo[a, FromDigits@ Flatten@ Map[IntegerDigits@ # &, If[n < 2, Reverse@ a, a]]], {n, 9}]; FromDigits[IntegerDigits@ #, 2] & /@ a (* Michael De Vlieger, Jan 13 2016 *)

Extensions

More terms from Michael De Vlieger, Jan 13 2016

A266926 a(0)=0, a(1)=1, a(2)=10; for n>2, a(n) = concat(a(1), ..., a(n-1)).

Original entry on oeis.org

0, 1, 10, 110, 110110, 110110110110, 110110110110110110110110, 110110110110110110110110110110110110110110110110, 110110110110110110110110110110110110110110110110110110110110110110110110110110110110110110110110
Offset: 0

Author

Giovanni Teofilatto, Jan 06 2016

Keywords

Comments

Decimal conversions: 0, 1, 2, 6, 54, 3510, 14380470, 241264265751990, 67909853583655146508751957430, ... . (See A267348.) - Michael De Vlieger, Jan 06 2016
After 10, a(n) is '110' repeated 2^(n-3) times. Therefore, for n>3, a(n) is the concatenation of a(n-1) with itself.
After 1, each term with the 0's omitted is a member of A136308.
The number of digits in a(n) is A098011(n+1).
The number of digits in a(n+2)/a(n+1) gives A103204 with 2 repeated.

Examples

			a(3) = concat(1, 10, 110) = 110110.
a(4) = concat(1, 10, 110, 110110) = 110110110110.
		

Crossrefs

Programs

  • Magma
    [n le 2 select n*5^(n-1) else 110*(10^(3*2^(n-3))-1)/999: n in [0..8]]; // Bruno Berselli, Jan 29 2016
  • Mathematica
    a = {0, 1}; Do[AppendTo[a, FromDigits@ Flatten@ Map[IntegerDigits@ # &, If[n < 2, Reverse@ a, a]]], {n, 8}]; a (* Michael De Vlieger, Jan 06 2016 *)

Formula

a(n) = 110*(10^(3*2^(n-3))-1)/999 for n>2. - Bruno Berselli, Jan 29 2016

Extensions

Definition by Michael De Vlieger, Jan 06 2016
Edited by Editors of the OEIS, Jan 29 2016

A265128 Nonprimes excluding numbers of the forms 2*p and p^i where p is a prime and i is a positive integer.

Original entry on oeis.org

0, 1, 12, 15, 18, 20, 21, 24, 28, 30, 33, 35, 36, 39, 40, 42, 44, 45, 48, 50, 51, 52, 54, 55, 56, 57, 60, 63, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 84, 85, 87, 88, 90, 91, 92, 93, 95, 96, 98, 99, 100, 102, 104, 105, 108, 110, 111, 112, 114, 115, 116
Offset: 1

Author

Giovanni Teofilatto, Dec 02 2015

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range@ 120, And[! PrimeQ@ #, Nand[EvenQ@ #, PrimeQ[#/2]], ! PrimePowerQ@ #] &] (* Michael De Vlieger, Dec 02 2015 *)
  • PARI
    isok(n) = ! (isprime(n) || (! (n%2) && isprime(n/2)) || isprimepower(n)); \\ Michel Marcus, Dec 02 2015