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 11-20 of 23 results. Next

A261172 Value of b for which A260871(n) = A[b](k), with k = A261171(n); A[b](k) = the number whose base-b representation is the concatenation of the base-b representations of (1, ..., k, k-1, ..., 1).

Original entry on oeis.org

2, 3, 2, 4, 3, 6, 9, 10, 11, 16, 12, 14, 22, 18, 25, 20, 2, 6, 18, 14, 7, 40, 31, 25, 23, 20, 22, 62, 65, 68, 29, 23, 38, 26, 104, 6, 34, 52
Offset: 1

Views

Author

M. F. Hasler, Aug 23 2015

Keywords

Comments

For more data, see the 2nd column of D. Broadhurst's list of [n, b, k, length(A260871(n))] given in A260871.

Examples

			A260871(1) = A[2](2), therefore a(1) = 2.
A260871(2) = A[3](3), therefore a(2) = 3.
A260871(3) = A[2](4), therefore a(3) = 2.
		

Crossrefs

Cf. A173427, A260853 - A260859, A173426, A260861 - A260866 and A260860 for A[b] with b=2, ..., b=16 and b=60.
See also A260852 = { primes of the form A260851(b) = A[b](b), b in A260343 }.

Programs

  • PARI
    A261172_list(LIM=1e499)={my(A=List(),p,d);for(b=2,9e9,for(n=b,9e9,if(LIMb)));ispseudoprime(p)&&listput(A,[log(p),n])));apply(t->t[2],vecsort(A))}

Formula

A260871(n) = A[a(n)](A261171(n)), where A[b](k) = Sum_{i=1..#d} d[i]*b^(#d-i), d = concatenation of (1, 2, ..., k, k-1, ..., 1) all written in base b.

A261170 Number of decimal digits of A260871(n), where A260871 lists primes whose base-b representation is the concatenation of the base-b representations of (1, 2, ..., k, k-1, ..., 1).

Original entry on oeis.org

2, 3, 4, 5, 7, 9, 17, 20, 31, 38, 43, 64, 64, 70, 91, 93, 102, 117, 120, 123, 127, 127, 127, 136, 160, 166, 176, 235, 321, 351, 353, 389, 403, 418, 418, 421, 422, 466, 542, 578, 579, 703, 706, 725, 731, 765, 780, 792, 795, 799, 803, 839, 840, 848, 849, 863
Offset: 1

Views

Author

M. F. Hasler, Sep 15 2015

Keywords

Comments

Larger values based on computations by D. Broadhurst, cf. data file in A260871.
See A261171 and A261172 for the k- and b-values such that A260871(n) = A[b](k), where the sequences A[b] of numbers whose base-b representation is the concatenation of the base-b representations of (1, 2, ..., k, k-1, ..., 1) are listed in A173427, A260853 - A260859, A173426, A260861 - A260866 and A260860 for bases b=2, ..., b=16 and b=60.

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

Original entry on oeis.org

0, 1, 25, 441, 27961, 7148857, 1830131001, 468514084153, 119939614479673, 30704541449950521, 7860362613477971257, 2012252829087011018041, 515136724246861226808633, 131875001407205856562222393, 33760000360244849399916500281, 8642560092222683848298425324857
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

The base 4 is listed in A260343, which means that a(4) = A260851(4) = 27961 is prime and therefore 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) = 25 = 16 + 2*4 + 1 = 121_4 is the concatenation of (1, 2, 1).
a(4) = 27961 = 12310321_4 is the concatenation of (1, 2, 3, 10, 3, 2, 1), where the middle "10" is the base-4 representation of 4.
		

Crossrefs

Base-4 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=4)=sum(i=1,#n=concat(vector(n*2-1,k,digits(min(k,n*2-k),b))),n[i]*b^(#n-i))

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

Original entry on oeis.org

0, 1, 225, 44521, 8732025, 1711559641, 335466848025, 65751518430361, 12887297839395225, 2525910379700086681, 495078434465717705625, 97035373155903680328601, 19018933138565843484771225, 3727710895159027432980276121, 10228838696316240496325238416281
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*r + (r - b)*(1 + b*r), is prime, where A_b is the base-b sequence, as here with b=14, and r = (b^b-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) = (14+1)^2 = 14^2 + 2*14 + 1 = 121_14, concatenation of (1, 2, 1).
a(15) = 123456789abcd101110dcba987654321_14 is the concatenation of (1, 2, 3, ..., 9, a, b, c, d, 10, 11, 10, d, ..., 1), where "d, 10, 11" are the base-14 representations of 13, 14, 15.
		

Crossrefs

Base-14 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases.
For primes see A261408.

Programs

  • PARI
    a(n,b=14)=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 = 14, we have a(n) = R(14,n)^2, where R(b,n) = (b^n-1)/(b-1) are the base-b repunits.

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

Original entry on oeis.org

0, 1, 256, 58081, 13075456, 2942086081, 661970995456, 148943498386081, 33512287502995456, 7540264693665886081, 1696559556157202995456, 381725900136606353386081, 85888327530754964702995456, 19324873694420145086040886081
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

See A260343 for the bases b such that B(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=15, 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) = (15+1)^2 = 15^2 + 2*15 + 1 = 121_15, concatenation of (1, 2, 1).
a(16) = 123456789abcde101110edcba987654321_15 is the concatenation of (1, 2, 3, ..., 9, a, ..., e, 10, 11, 10, e, d, ..., 1), where "e, 10, 11" are the base-15 representations of 14, 15, 16.
		

Crossrefs

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

Programs

  • PARI
    a(n,b=15)=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 = 15, 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.

A359149 Concatenate the binary strings for 1,2,...,n-1, n, n-1, ..., 2,1.

Original entry on oeis.org

1, 1101, 11011101, 1101110011101, 1101110010110011101, 1101110010111010110011101, 1101110010111011111010110011101, 11011100101110111100011111010110011101, 1101110010111011110001001100011111010110011101, 110111001011101111000100110101001100011111010110011101
Offset: 1

Views

Author

N. J. A. Sloane, Feb 18 2023

Keywords

Comments

Binary analog of A173426 and A360504.
Converting these binary strings to base 10 gives A173427. E.g. 1101_2 = 13_10 gives A173427(3) = 13.
What is the first prime here if these strings are regarded as decimal numbers as they stand? a(5) = 1101110010110011101 = 3*37*53*187168113226247 is obviously not a prime.

Crossrefs

Programs

  • Maple
    a:= n-> parse(cat(map(t-> convert(t, binary), [$1..n, n-i$i=1..n-1])[])):
    seq(a(n), n=1..10);  # Alois P. Heinz, Feb 18 2023
  • Mathematica
    a[n_] := FromDigits @ Flatten @ IntegerDigits[Join[Range[1, n], Range[n - 1, 1, -1]], 2]; Array[a, 10] (* Amiram Eldar, Feb 18 2023 *)
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        sl, sr, sk = "", "", "1"
        for k in count(1):
            sk = bin(k)[2:]
            sl += sk
            yield int(sl + sr)
            sr = sk + sr
    print(list(islice(agen(), 10))) # Michael S. Branicky, Feb 18 2023

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

Original entry on oeis.org

0, 1, 36, 961, 24336, 3034961, 1896581836, 1185364159961, 740852620019336, 463032888020409961, 289395555025471581836, 180872221891237629784961, 113045138682031465901269336, 70653211676269864870442284961, 44158257297668670511080159081836
Offset: 0

Views

Author

M. F. Hasler, Aug 01 2015

Keywords

Comments

Base-5 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases b = 3, ..., 16.
The base 5 is not listed in A260343, because a(5) = A260851(5) = 3034961 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) = 36 = (5+1)^2 = 5^2 + 2*5 + 1 = 121_4 is the concatenation of (1, 2, 1).
a(5) = 3034961 = 1234104321_5 is the concatenation of (1, 2, 3, 4, 10, 4, 3, 2, 1), where the middle "10" is the base-5 representation of 5.
		

Programs

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

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.
Previous Showing 11-20 of 23 results. Next