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-38 of 38 results.

A260856 Base-6 representation is the concatenation of the base-6 representations of 1, 2, ..., n, n-1, ..., 1.

Original entry on oeis.org

0, 1, 49, 1849, 67081, 2418025, 522134761, 676678989289, 876975982612969, 1136560874204496361, 1472982892995886760425, 1908985829323636470956521, 2474045634803467686907986409, 3206363142705295375772778742249, 4155446632946062852128962559066601
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Examples

			a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = 49 = (6+1)^2 = 6^2 + 2*6 + 1 = 121_6 is the concatenation of (1, 2, 1).
a(7) = 676678989289 = 1234510111054321_6 is the concatenation of (1, 2, 3, 4, 5, 10, 11, 10, 5, 4, 3, 2, 1), where the middle "10, 11, 10" are the base 6 representations of 6, 7, 6.
		

Crossrefs

Base 6 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases b = 3, ..., 16.

Programs

  • PARI
    a(n,b=6)=sum(i=1,#n=concat(vector(n*2-1,k,digits(min(k,n*2-k),b))),n[i]*b^(#n-i))

A260857 Base-7 representation of a(n) is the concatenation of the base-7 representations of 1, 2, ..., n, n-1, ..., 1.

Original entry on oeis.org

0, 1, 64, 3249, 160000, 7845601, 384473664, 131870760799, 316621469105950, 760208147660763999, 1825259762561514314050, 4382448689911580334132199, 10522259304477772232578647150, 25263944590051134455098854865399, 60658730960712773989601560650105250
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

Base-7 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases.
The base 7 is not listed in A260343, because a(7) = A260851(7) = 131870760799 = 12345610654321_7 is not prime and therefore not in A260852. See these sequences for more information.

Examples

			a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = 64 = (7+1)^2 = 7^2 + 2*7 + 1 = 121_7 is the concatenation of (1, 2, 1).
a(8) = 316621469105950 = 123456101110654321_7 is the concatenation of (1, 2, 3, 4, 5, 6, 10, 11, 10, 6, 5, 4, 3, 2, 1), where the middle "10, 11, 10" are the base-7 representations of 7, 8, 7.
		

Programs

  • Mathematica
    Table[FromDigits[Flatten[Join[IntegerDigits[Range[n],7], IntegerDigits[ Range[ n-1,1,-1],7]]],7],{n,0,20}] (* Harvey P. Dale, Nov 02 2017 *)
  • PARI
    a(n,b=7)=sum(i=1,#n=concat(vector(n*2-1,k,digits(min(k,n*2-k),b))),n[i]*b^(#n-i))

A260858 Base-8 representation of a(n) is the concatenation of the base-8 representations of 1, 2, ..., n, n-1, ..., 1.

Original entry on oeis.org

0, 1, 81, 5329, 342225, 21911761, 1402427601, 89755965649, 45954960939217, 188231512819194065, 770996276517410920657, 3158000748616424634669265, 12935171066332946781853145297, 52982460687699754593548358342865, 217016158976818195107979529799293137
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

Base-8 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases.
The base 8 is not listed in A260343, because a(8) = A260851(8) = 45954960939217 is not prime and therefore not in A260852. See these sequences for more information.

Examples

			a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = 81 = (8+1)^2 = 8^2 + 2*8 + 1 = 121_8, the concatenation of (1, 2, 1).
a(9) = 12345671011107654321_8, concatenation of (1, 2, 3, 4, 5, 6, 7, 10, 11, 10, 7, 6, 5, 4, 3, 2, 1), where the middle "10, 11, 10" are the base-8 representations of 8, 9, 8.
		

Programs

  • PARI
    a(n,b=8)=sum(i=1,#n=concat(vector(n*2-1,k,digits(min(k,n*2-k),b))),n[i]*b^(#n-i))

Formula

For n < b = 8, we have a(n) = A_b(n) = R(b,n)^2, where R(b,n) = (b^n-1)/(b-1) are the base-b repunits.

A260862 Base-12 representation of a(n) is the concatenation of the base-12 representations of 1, 2, ..., n, n-1, ..., 1.

Original entry on oeis.org

0, 1, 169, 24649, 3553225, 511709641, 73686731209, 10610895808969, 1527969074670025, 220027547690625481, 31683966878707771849, 4562491230669011577289, 7883984846509322664831433, 163482309777203435651765004745, 3389969175540090458609916107975113
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

The first prime in this sequence is a(16) = A260871(11). Since a(12) is not prime, the base 12 is not listed in A260343.

Examples

			a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = (12+1)^2 = 12^2 + 2*12 + 1 = 121_12, concatenation of (1, 2, 1).
a(13) = 123456789ab101110ba987654321_12 is the concatenation of (1, 2, 3, ..., 9, a, b, 10, 11, 10, b, ..., 1), where "b, 10, 11" are the base-12 representations of 11, 12, 13.
		

Crossrefs

Base-12 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases.

Programs

  • PARI
    a(n,b=12)=sum(i=1,#n=concat(vector(n*2-1,k,digits(min(k,n*2-k),b))),n[i]*b^(#n-i))

Formula

For n < b = 12, we have a(n) = R(b,n)^2, where R(b,n) = (b^n-1)/(b-1) are the base-b repunits.

A260863 Base-13 representation of a(n) is the concatenation of the base-13 representations of 1, 2, ..., n, n-1, ..., 1.

Original entry on oeis.org

0, 1, 196, 33489, 5664400, 957345481, 161792190756, 27342890695849, 4620948663553600, 780940325907974961, 131978915101424183716, 22304436652439380447009, 3769449794266138309731600, 8281481197999449959084458465, 236527384496061684935031509169004
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

See A260343 for the bases b such that A260851(b) = A_b(b) = b*c + (c - b)*(1 + b*c), is prime, where A_b is the base-b sequence, as here with b = 13, and c = R(b,b) = (b^n-1)/(b-1) is the base-b repunit of length b.

Examples

			a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = (13+1)^2 = 13^2 + 2*13 + 1 = 121_13, concatenation of (1, 2, 1).
a(14) = 123456789abc101110cba987654321_13 is the concatenation of (1, 2, 3, ..., 9, a, b, c, 10, 11, 10, c, ..., 1), where "c, 10, 11" are the base-13 representations of 12, 13, 14.
		

Crossrefs

Base-13 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases.

Programs

  • PARI
    a(n,b=13)=sum(i=1,#n=concat(vector(n*2-1,k,digits(min(k,n*2-k),b))),n[i]*b^(#n-i))

Formula

For n < b = 13, we have a(n) = A_b(n) = R(b,n)^2, where R(b,n) = (b^n-1)/(b-1) are the base-b repunits.

A261138 The concatenation of 123456...n and the reverse of this number.

Original entry on oeis.org

11, 1221, 123321, 12344321, 1234554321, 123456654321, 12345677654321, 1234567887654321, 123456789987654321, 1234567891001987654321, 12345678910111101987654321, 123456789101112211101987654321, 1234567891011121331211101987654321, 12345678910111213144131211101987654321
Offset: 1

Views

Author

Umut Uludag, Aug 10 2015

Keywords

Comments

Let R(n) denote the number obtained by formally reversing the digits of n, including any leading zeros that may appear; a(n) is the decimal concatenation of 1,2,...,n,R(n),R(n-1),...,R(3),R(2),R(1). - N. J. A. Sloane, Dec 01 2021
A palindromic version of A173426.
Has same start as A259937, but A259937 generates non-palindromic terms for n>9.
All terms are multiples of 11 (cf. A349805).

Examples

			For n=10 we concatenate 1,2,3,...,10,01,9,8,...3,2,1 getting 1234567891001987654321.
		

Crossrefs

Programs

  • Maple
    with(StringTools);
    myReverse := n -> Reverse(convert(n,string));
    A349804:=proc(n) local i,L,R;
    L:=""; R:="";
    for i from n to 1 by -1 do
    L:=Join( [convert(i,string), L],"");
    R:=Join( [R, myReverse(convert(i,string))],"");
    od:
    parse(Join([L,R],""));
    end proc; # N. J. A. Sloane, Dec 01 2021
    # second Maple program:
    a:= n-> (s-> parse(cat(s, seq(s[-i], i=1..length(s)))))(cat("", $1..n)):
    seq(a(n), n=1..14); # Alois P. Heinz, Dec 01 2021
  • Mathematica
    Table[d = Flatten[IntegerDigits /@ Range@ n]; FromDigits@ Flatten[{d, Reverse@ d}], {n, 13}] (* Michael De Vlieger, Aug 20 2015 *)
  • Python
    def A349804(n): return int((lambda x: x+x[::-1])(''.join(str(d) for d in range(1,n+1)))) # Chai Wah Wu, Dec 01 2021

Formula

a(n) = concatenate( A007908(n), A138793(n) retaining leading zeros).

Extensions

More than the usual number of terms are shown in order to distinguish this from several similar sequences.
Edited by N. J. A. Sloane, Dec 11 2021

A323532 Numbers k such that the decimal concatenation of the numbers from 1 up to k followed by digit reversals of the numbers from (k-1) down to 1 is a prime.

Original entry on oeis.org

10, 586, 2219
Offset: 1

Views

Author

Mikk Heidemaa, Jan 17 2019

Keywords

Comments

The definition is related to the sequence discussed by N. J. A. Sloane (in Notices of the AMS (2018), Vol. 65, No. 9, pp. 1070-71) for which only a(1)-a(2) are known.
a(1) corresponds to a memorable prime (12345678910987654321); a(4) > 10000 (if it exists).

Examples

			10 is a term because 12345678910987654321 is a prime.
2219 is a term because 1...22172218221981227122...1 is a 15534-digit probable prime (where 8122 following 2219 corresponds to the digit reversal of 2218, 7122 to that of 2217, etc. down to 1).
		

Crossrefs

Cf. A173426 (similar but different concatenation scheme).

Programs

  • Mathematica
    a[n_]:=Block[{cn=Drop[FoldList[Append, {}, ToString/@Range@n], 2]}, ParallelMap[If[PrimeQ[FromDigits@@{#<>Reverse@StringReverse@Most@#}], Length@#, Nothing]&, cn]]; a[2300]
  • PARI
    f(n) = eval(concat(vector(2*n-1, k, if(k<=n, Str(k), concat(apply(x->Str(x), Vecrev(digits(2*n-k))))))));
    isok(n) = ispseudoprime(f(n)); \\ Michel Marcus, Jan 20 2019

A350153 Prime numbers created by concatenating all numbers 1 through k for some k > 1, then continuing to concatenate all numbers from k-1 towards 1. Primes are added to the sequence as they are found as k increases.

Original entry on oeis.org

12343, 1234543, 12345678910987, 12345678910987654321, 12345678910111213141516171819202122212019181716151413, 12345678910111213141516171819202122232425262728293029
Offset: 1

Views

Author

Patrick Quam, Dec 16 2021

Keywords

Comments

A173426(n) is the concatenation of all numbers from 1 up to k and then back down to 1. The prime terms of A173426 have been called "memorable primes" (see the Numberphile video). These "unmemorable primes" are a superset created by concatenating 1..k in ascending order followed by concatenating the numbers k-1..1 in descending order. Any primes found during either concatenation process are added to the sequence (e.g., k = 5, 1234543 is included. If 12345 were prime, it would be included as well).

Examples

			For k=10, the first prime obtained by concatenating the numbers 1..10 and then concatenating the first one or more numbers from 9..1 is 12345678910987.
		

Crossrefs

Programs

  • Maple
    select(isprime, [seq(seq(parse(cat($1..n, n-i$i=1..t)),
                    t=0..n-1), n=1..30)])[];  # Alois P. Heinz, Dec 19 2021
  • Mathematica
    lst={};Table[s=Flatten[IntegerDigits/@Range@n];k=n-1;
    While[k!=-1,If[PrimeQ[p=FromDigits@s],AppendTo[lst,p]];s=Join[s,IntegerDigits@k];k--],{n,100}];lst (* Giorgos Kalogeropoulos, Dec 17 2021 *)
  • Python
    from itertools import count, chain, islice, accumulate
    from sympy import isprime
    def A350153gen(): return filter(lambda p:isprime(p),(int(s) for n in count(1) for s in accumulate(str(d) for d in chain(range(1,n+1),range(n-1,0,-1)))))
    A350153_list = list(islice(A350153gen(),20)) # Chai Wah Wu, Dec 20 2021
Previous Showing 31-38 of 38 results.