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 61-70 of 72 results. Next

A272617 Concatenation of the numbers from n down to 1 with numbers from 1 to n.

Original entry on oeis.org

11, 2112, 321123, 43211234, 5432112345, 654321123456, 76543211234567, 8765432112345678, 987654321123456789, 1098765432112345678910, 11109876543211234567891011, 121110987654321123456789101112, 1312111098765432112345678910111213, 14131211109876543211234567891011121314
Offset: 1

Views

Author

Keywords

Comments

Conjecture: a(1) is the only prime number.
No other prime terms up to a(8000). - Giovanni Resta, May 07 2016

Examples

			a(1) = concatenate("1", "1") = 11.
a(2) = concatenate("2", "1", "1", "2") = 2112.
a(3) = concatenate("3", "2", "1", "1", "2", "3") = 321123.
		

Crossrefs

Programs

  • Mathematica
    FromDigits@Flatten@IntegerDigits@Join[Reverse@#, #] & /@ Table[Range@n, {n, 20}]
  • PARI
    a(n)={fromdigits(concat(concat(Vecrev(vector(n,i,digits(i)))), concat(vector(n,i,digits(i)))))} \\ Andrew Howroyd, Dec 23 2019

Formula

a(n) = A000422(n) concatenated with A007908(n).

Extensions

Terms a(11) and beyond from Andrew Howroyd, Dec 23 2019

A280987 {Concatenation n, n-1, n-2, ...3,2,1} mod sigma(n).

Original entry on oeis.org

0, 0, 1, 2, 3, 9, 1, 6, 4, 1, 9, 21, 1, 9, 9, 16, 9, 24, 1, 33, 17, 1, 9, 21, 0, 9, 1, 41, 21, 33, 17, 6, 33, 19, 33, 25, 25, 21, 1, 1, 33, 81, 17, 21, 45, 1, 33, 85, 49, 69, 57, 77, 27, 81, 1, 81, 1, 1, 21, 57, 59, 81, 33, 60, 21, 33, 45, 51, 81, 1, 9, 66, 41, 9, 97, 1, 81, 81, 1, 57, 117, 73, 33, 145
Offset: 1

Views

Author

Indranil Ghosh, Jan 12 2017

Keywords

Examples

			For n = 11, A000422(n) mod sigma(n) = 1110987654321 mod 12 = 9. S0 a(11) = 9.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[FromDigits[Flatten[IntegerDigits/@Range[n,1,-1]]],DivisorSigma[ 1,n]],{n,90}] (* Harvey P. Dale, Jul 01 2020 *)
  • Python
    def sigma(n):
        s=0
        for i in range(1,n+1):
            if n%i==0:
                s+=i
        return s
    def C(n):
        s=""
        for i in range(n,0,-1):
            s+=str(i)
        return int(s)
    for i in range(1,101):
        print(i, C(i)%sigma(i))
    
  • Python
    from sympy import divisor_sigma
    def A280987(n): return int(''.join(map(str, range(n, 0, -1)))) % divisor_sigma(n) # David Radcliffe, Aug 08 2025

Formula

a(n) = A000422(n) mod A000203(n).

A333183 Number of digits in concatenation of first n positive even integers.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154
Offset: 1

Views

Author

Alexander Goebel, Mar 10 2020

Keywords

Comments

Connected with A019520 and A038396, similar to how A058183 applies to both A007908 and A000422 to count the digits in them, as the order of the digits does not matter (2468 returns the same result as 8642).

Examples

			For example, a(5) = 6 because 246810 (the concatenation of the first five positive even integers) has six digits.
		

Crossrefs

Programs

Formula

a(n) = A058183(n) - Sum_{1..A058183(n)} A000035(A058183(n)).
a(n) = Sum_{i=1..n} (1+floor(log_10(2*i))). - Robert Israel, Apr 05 2020

A348792 Numbers k such that the reverse concatenation of the first k binary numbers A098780(k) is prime.

Original entry on oeis.org

2, 3, 4, 7, 11, 13, 25, 97, 110, 1939
Offset: 1

Views

Author

N. J. A. Sloane, Dec 03 2021

Keywords

Examples

			a(4) = 7 is because the binary number 111 110 101 100 11 10 1 (with no spaces), which is 128413 in decimal, is prime.
		

Crossrefs

Programs

  • Maple
    q:= n-> isprime(Bits[Join](['Bits[Split](i)[]'$i=1..n])):
    select(q, [$1..200])[];  # Alois P. Heinz, Dec 03 2021
  • Mathematica
    f[n_] := FromDigits[Flatten @ IntegerDigits[Range[n, 1, -1], 2], 2]; Select[Range[120], PrimeQ[f[#]] &] (* Amiram Eldar, Dec 03 2021 *)
  • Python
    from sympy import isprime
    def afind(limit):
        s, k = "", 1
        for k in range(1, limit+1):
            s += bin(k)[2:][::-1]
            t = int(s[::-1], 2)
            if isprime(t):
                print(k, end=", ")
    afind(200) # Michael S. Branicky, Dec 03 2021

Extensions

a(8)-a(10) from Amiram Eldar, Dec 03 2021

A360505 Concatenate the ternary strings for n, n-1, n-2, ..., 2, 1.

Original entry on oeis.org

1, 21, 1021, 111021, 12111021, 2012111021, 212012111021, 22212012111021, 10022212012111021, 10110022212012111021, 10210110022212012111021, 11010210110022212012111021, 11111010210110022212012111021, 11211111010210110022212012111021, 12011211111010210110022212012111021
Offset: 1

Views

Author

N. J. A. Sloane, Feb 17 2023

Keywords

Comments

Similar to A360502, but here we count down from n to 1 in base 3 and concatenate the strings to get a(n).
This is the ternary analog of A000422.

Crossrefs

Programs

  • Mathematica
    a[n_] := FromDigits @ Flatten @ IntegerDigits[Range[n, 1, -1], 3]; Array[a, 15] (* Amiram Eldar, Feb 18 2023 *)
  • PARI
    a(n) = strjoin(concat([digits(k, 3) | k <- Vecrev([1..n])])) \\ Rémy Sigrist, Feb 18 2023
    
  • Python
    from sympy.ntheory import digits
    def a(n): return int("".join("".join(map(str, digits(k, 3)[1:])) for k in range(n, 0, -1)))
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Feb 18 2023
    
  • Python
    # faster version for initial segment of sequence
    from sympy.ntheory import digits
    from itertools import count, islice
    def agen(s=""): yield from (int(s:="".join(map(str, digits(n, 3)[1:]))+s) for n in count(1))
    print(list(islice(agen(), 15))) # Michael S. Branicky, Feb 18 2023

A078192 a(n) = floor(concatenation of n down to 1 divided by n).

Original entry on oeis.org

1, 10, 107, 1080, 10864, 109053, 1093474, 10956790, 109739369, 1098765432, 100998877665, 10092582304526, 1009316229819563, 100937222213403880, 10094208074065843621, 1009463320069436728395, 100950083124771234567901, 10095341745173395054869684
Offset: 1

Views

Author

Amarnath Murthy, Nov 21 2002

Keywords

Examples

			a(6) = floor(654321/6) = 109053.
		

Crossrefs

Programs

  • Maple
    a:= n-> floor(parse(cat(1+n-i$i=1..n))/n):
    seq(a(n), n=1..19);  # Alois P. Heinz, Jun 20 2025
  • Mathematica
    Table[Floor[FromDigits[Flatten[IntegerDigits/@Reverse[Range[n]]]]/n],{n,20}] (* Harvey P. Dale, Jul 22 2012 *)

Formula

a(n) = floor(A000422(n) / n). - Sean A. Irvine, Jun 20 2025

Extensions

More terms from Jon E. Schoenfield, May 08 2010

A078998 Choose a(n) so that a(1)+a(2)+...+a(n) = concatenation of n first natural numbers.

Original entry on oeis.org

1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 12222222121, 1222222212101, 122222221210101, 12222222121010101, 1222222212101010101, 122222221210101010101, 12222222121010101010101
Offset: 1

Views

Author

Benoit Cloitre, Jan 12 2003

Keywords

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[a]; AppendTo[b, p], {n, 1, 30}]; c = {}; Do[AppendTo[c, b[[n + 1]] - b[[n]]], {n, 1, Length[b] - 1}]; c (* Artur Jasinski, Mar 30 2008 *)

Formula

a(1)=1; for n>1, a(n) = A007908(n)-A007908(n-1)

A095252 a(n) = floor(sqrt{concatenation n,(n-1),...,3,2,1}).

Original entry on oeis.org

1, 4, 17, 65, 233, 808, 2766, 9362, 31426, 104822, 1054033, 11005043, 114547418, 1188747707, 12305003905, 127088210000, 1310019623181, 13480213329659, 138498072735374, 1420979139942389, 14560878466498901, 149036972532711329, 1523880579042109897
Offset: 1

Views

Author

Amarnath Murthy, Jun 17 2004

Keywords

Comments

a(n) = floor(sqrt(A000422(n))). - Stefan Steinerberger, May 05 2007

Examples

			a(4) = floor(sqrt(4321)) = 65.
		

Crossrefs

Cf. A068995.

Programs

  • Maple
    a:= n-> floor(sqrt(parse(cat((n-i)$i=0..n-1)))):
    seq(a(n), n=1..30);  # Alois P. Heinz, Aug 26 2015
  • Mathematica
    Table[Floor[Sqrt[FromDigits[Flatten[Table[IntegerDigits[i],{i,n,1,-1}]]]]],{n,1,25}] (* Stefan Steinerberger, May 05 2007 *)
    Table[Floor[Sqrt[FromDigits[Flatten[IntegerDigits/@Range[n,1,-1]]]]],{n,25}] (* Harvey P. Dale, Jul 22 2024 *)

Extensions

More terms from Stefan Steinerberger, May 05 2007

A138795 a(n) = (A138793(n+1)-A138793(n))/10^n.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 1, 110, 2100, 31000, 410000, 5100000, 61000000, 710000000, 8100000000, 91000000000, 20000000000, 1200000000000, 22000000000000, 320000000000000, 4200000000000000, 52000000000000000, 620000000000000000
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008

Keywords

Comments

First differences of A138793 divided by 10^n

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, p], {n, 1, 61}]; c = {}; Do[AppendTo[c, (b[[n + 1]] - b[[n]])/(10^n)], {n, 1, Length[b] - 1}]; c (*Artur Jasinski*)

Formula

a(n) = A138793(n+1)-A138793(n)

A283514 Concatenation of the numbers from n down to 3.

Original entry on oeis.org

3, 43, 543, 6543, 76543, 876543, 9876543, 109876543, 11109876543, 1211109876543, 131211109876543, 14131211109876543, 1514131211109876543, 161514131211109876543, 17161514131211109876543, 1817161514131211109876543, 191817161514131211109876543
Offset: 3

Views

Author

XU Pingya, Apr 14 2017

Keywords

Comments

The a(3) = 3, a(4) = 43, a(7) = 76543, a(46) = 464544...876543 are primes in this sequence (for n < 2823).

Crossrefs

Previous Showing 61-70 of 72 results. Next