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.

Showing 1-9 of 9 results.

A322131 In the decimal expansion of n, replace each digit d with 2*d.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 210, 212, 214, 216, 218, 40, 42, 44, 46, 48, 410, 412, 414, 416, 418, 60, 62, 64, 66, 68, 610, 612, 614, 616, 618, 80, 82, 84, 86, 88, 810, 812, 814, 816, 818, 100, 102, 104, 106, 108, 1010, 1012, 1014
Offset: 0

Views

Author

Rémy Sigrist, Nov 27 2018

Keywords

Comments

This is an operation on digit strings: 1066 becomes 201212, for example. 86420 becomes 1612840. The result is always even - see A330336. - N. J. A. Sloane, Dec 17 2019
This sequence is a variant of A124108 in decimal base.

Examples

			For n = 109:
- we replace "1" with "2", "0" with "0" and "9" with "18",
- hence a(109) = 2018.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember;
    local m,d;
    d:= n mod 10; m:= floor(n/10);
    if d >= 5 then 100*procname(m) + 2*d
    else 10*procname(m)+2*d
    fi
    end proc:
    f(0):= 0:
    map(f, [$0..100]); # Robert Israel, Nov 28 2018
  • Mathematica
    a[n_] := FromDigits@Flatten@IntegerDigits[2*IntegerDigits[n]]; Array[a, 60, 0] (* Amiram Eldar, Nov 28 2018 *)
  • PARI
    a(n, base=10) = my (d=digits(n, base), v=0); for (i=1, #d, v = v*base^max(1,#digits(2*d[i],base)) + 2*d[i]); v
    
  • Python
    def A322131(n):
       return int(''.join(str(int(d)*2) for d in str(n))) # Chai Wah Wu, Nov 29 2018

Formula

A061581(n+1) = a(A061581(n)).
A066686(a(n), a(k)) = a(A066686(n, k)) for any n > 0 and k > 0.
a(10*n + d) = 10*a(n) + 2*d for any n >= 0 and d = 0..4.
a(10*n + d) = 100*a(n) + 2*d for any n >= 0 and d = 5..9.
G.f. g(x) satisfies g(x) = (2*x + 4*x^2 + 6*x^3 + 8*x^4 + 10*x^5 + 12*x^6 + 14*x^7 + 16*x^8 + 18*x^9)/(1-x^10) + (10 + 10*x + 10*x^2 + 10*x^3 + 10*x^4 + 100*x^5 + 100*x^6 + 100*x^7 + 100*x^8 + 100*x^9)*g(x^10). - Robert Israel, Nov 28 2018

A084854 Triangular array, read by rows: T(n,k) = concatenated decimal representations of n and k, 1<=k<=n.

Original entry on oeis.org

11, 21, 22, 31, 32, 33, 41, 42, 43, 44, 51, 52, 53, 54, 55, 61, 62, 63, 64, 65, 66, 71, 72, 73, 74, 75, 76, 77, 81, 82, 83, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 1010, 111, 112, 113, 114, 115, 116, 117, 118, 119, 1110, 1111
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 09 2003

Keywords

Crossrefs

Programs

  • Python
    def T(n, k): return int(str(n) + str(k))
    def auptorow(maxrow):
        return [T(n, k) for n in range(1, maxrow+1) for k in range(1, n+1)]
    print(auptorow(11)) # Michael S. Branicky, Nov 21 2021

Formula

T(n, k) = n*10^A055642(k) + k.
T(n, 1) = A017281(n); T(n, n) = A020338(n).

A067574 Array T(i,j) read by ascending antidiagonals, where T(i,j) is the concatenation of i and j (1<=i, 1<=j).

Original entry on oeis.org

11, 21, 12, 31, 22, 13, 41, 32, 23, 14, 51, 42, 33, 24, 15, 61, 52, 43, 34, 25, 16, 71, 62, 53, 44, 35, 26, 17, 81, 72, 63, 54, 45, 36, 27, 18, 91, 82, 73, 64, 55, 46, 37, 28, 19, 101, 92, 83, 74, 65, 56, 47, 38, 29, 110, 111, 102, 93, 84, 75, 66, 57, 48, 39, 210, 111
Offset: 1

Views

Author

Robert G. Wilson v, Jan 30 2002

Keywords

Comments

The antidiagonals are read in the opposite direction to those in A066686.

Examples

			The array begins
11 12 13 14 15 16 17 18 19 110 ...
21 22 23 24 25 26 27 28 29 210 ...
31 32 33 34 35 36 37 38 39 310 ...
41 42 43 44 45 46 47 48 49 410 ...
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[ a = Append[a, ToExpression[ StringJoin[ ToString[i - j], ToString[j]]]], {i, 2, 13}, {j, 1, i - 1} ]; a
  • Python
    def T(i, j): return int(str(i) + str(j))
    def auptodiag(maxd):
        return [T(d+1-j, j) for d in range(1, maxd+1) for j in range(1, d+1)]
    print(auptodiag(12)) # Michael S. Branicky, Nov 21 2021

Formula

T(i, j) = i*10^A055642(i) + j. - Michael S. Branicky, Nov 21 2021

A328903 Number of primes that are a concatenation of two positive integers whose sum is n.

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 0, 2, 3, 0, 3, 4, 0, 3, 5, 0, 4, 2, 0, 6, 5, 0, 4, 5, 0, 6, 7, 0, 6, 9, 0, 6, 8, 0, 9, 8, 0, 7, 7, 0, 9, 10, 0, 11, 2, 0, 12, 12, 0, 10, 11, 0, 11, 14, 0, 3, 10, 0, 10, 12, 0, 16, 12, 0, 16, 14, 0, 14, 19, 0, 13, 17, 0, 12, 16, 0, 15, 2, 0
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Oct 30 2019

Keywords

Comments

First n > 1 with n != 0 (mod 3) and a(n) = 0 is n = 4477. - Alois P. Heinz, Oct 30 2019

Examples

			1(-), 2(11), 3(-), 4(13, 31), 5(23, 41), 6(-), 7(43, 61), 8(17, 53, 71), 9(-), 10(19, 37, 73), 11(29, 47, 83, 101), 12(-), 13(67, 103, 211), ...
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(irem(n, 3)=0, 0, add(
         `if`(isprime(parse(cat(i, n-i))), 1, 0), i=1..n-1))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Oct 30 2019

Formula

a(n) = 0 if n = 1 or n == 0 (mod 3). - Alois P. Heinz, Oct 30 2019

Extensions

More terms from Alois P. Heinz, Oct 30 2019

A083678 Numbers m = d_1 d_2 ... d_k (in base 10) with properties that k is even and d_i + d_{k+1-i} = 10 for all i.

Original entry on oeis.org

19, 28, 37, 46, 55, 64, 73, 82, 91, 1199, 1289, 1379, 1469, 1559, 1649, 1739, 1829, 1919, 2198, 2288, 2378, 2468, 2558, 2648, 2738, 2828, 2918, 3197, 3287, 3377, 3467, 3557, 3647, 3737, 3827, 3917, 4196, 4286, 4376, 4466, 4556, 4646, 4736, 4826, 4916
Offset: 1

Views

Author

Zak Seidov Jun 15 2003

Keywords

Comments

The two-digit terms here occur in many sequences, e.g., A066686, A081926, A017173, A030108, A043457, A052224, A061388, A084364.

Examples

			1469 and 6284 are members because 1+9=4+6=10 and 6+4=2+8=10.
		

Crossrefs

Programs

  • Mathematica
    ok10Q[n_]:=Module[{idn=IntegerDigits[n]},idn[[1]]+idn[[4]]==idn[[2]]+idn[[3]]==10]; Join[ Select[ Range[10,99],Total[IntegerDigits[#]]==10&],Select[Range[1000,9999],ok10Q]] (* Harvey P. Dale, Oct 14 2023 *)
  • PARI
    isok(n) = {digs = digits(n); if (#digs % 2 == 0, for (i = 1, #digs/2, if ((digs[i] + digs[#digs+1-i]) ! = 10, return (0));); return (1);); return (0);} \\ Michel Marcus, Oct 05 2013

A084855 Triangular array, read by rows: T(n,k) = concatenated decimal representations of k and n, 1<=k<=n.

Original entry on oeis.org

11, 12, 22, 13, 23, 33, 14, 24, 34, 44, 15, 25, 35, 45, 55, 16, 26, 36, 46, 56, 66, 17, 27, 37, 47, 57, 67, 77, 18, 28, 38, 48, 58, 68, 78, 88, 19, 29, 39, 49, 59, 69, 79, 89, 99, 110, 210, 310, 410, 510, 610, 710, 810, 910, 1010, 111, 211, 311, 411, 511, 611, 711, 811, 911, 1011, 1111
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 09 2003

Keywords

Crossrefs

Programs

  • Python
    def T(n, k): return int(str(k) + str(n))
    def auptorow(maxrow):
        return [T(n, k) for n in range(1, maxrow+1) for k in range(1, n+1)]
    print(auptorow(11)) # Michael S. Branicky, Nov 21 2021

Formula

T(n, k) = k*10^A055642(n) + n.
T(n, n) = A020338(n).

A318225 Lexicographically earliest sequence of positive terms such that the concatenation of two consecutive terms is always unique.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 10, 2, 11, 3, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 3, 10, 3, 11, 4, 4, 5, 4, 6, 4, 7, 4, 8, 4, 9, 4, 10, 4, 11, 5, 5, 6, 5, 7, 5, 8, 5, 9, 5, 10, 5
Offset: 1

Views

Author

Rémy Sigrist, Aug 21 2018

Keywords

Comments

In other words, for any distinct i and j, A066686(a(i), a(i+1)) <> A066686(a(j), a(j+1)).
The sequence b such that for any n > 0, b(n) = A066686(a(n), a(n+1)), satisfies b(n) = A303446(n+1) for n = 1..116 and b(117) <> A303446(118).
The sequence contains long runs of consecutive terms where one term out of two equals 1.

Examples

			The first terms, alongside the concatenation of a(n) and of a(n+1), are:
  n  a(n)   A066686(a(n), a(n+1))
  -- ----   ---------------------
   1    1    11
   2    1    12
   3    2    21
   4    1    13
   5    3    31
   6    1    14
   7    4    41
   8    1    15
   9    5    51
  10    1    16
  11    6    61
  12    1    17
  13    7    71
  14    1    18
  15    8    81
  16    1    19
  17    9    91
  18    1   110
  19   10   101
  20    1   111
  21   11   112
  22    2    22
  23    2    23
  24    3    32
  25    2    24
		

Crossrefs

A328932 Number of primes that are a concatenation of two positive integers whose sum is prime(n).

Original entry on oeis.org

1, 0, 2, 2, 4, 3, 2, 6, 5, 9, 6, 7, 10, 11, 12, 14, 12, 16, 14, 17, 12, 15, 16, 20, 19, 19, 20, 17, 23, 23, 18, 27, 28, 24, 30, 25, 26, 26, 28, 30, 27, 30, 32, 27, 25, 27, 37, 42, 38, 32, 32, 33, 30, 39, 38, 36, 43, 38, 43, 42, 36, 36, 47, 47, 49, 38, 45, 48, 51, 50
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 31 2019

Keywords

Examples

			a(3) = 2 because primes 23, 41 are concatenations of prime(3) = 5 = 2 + 3 = 4 + 1.
		

Crossrefs

Subsequence of A328903.

Programs

  • Maple
    a:= n-> (p-> add(`if`(isprime(parse(cat(i,
            p-i))), 1, 0), i=1..p-1))(ithprime(n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Oct 31 2019

Formula

a(n) = A328903(A000040(n)).

A358596 a(n) is the least prime p such that the concatenation p|n has exactly n prime factors with multiplicity.

Original entry on oeis.org

3, 2, 83, 2, 67, 41, 947, 4519, 15659081, 2843, 337957, 389, 1616171, 6132829, 422116888343, 24850181, 377519743, 194486417892947, 533348873, 324403, 980825013273164555563, 25691144027, 273933405157, 1238831928746353181, 311195507789, 129917586781, 2159120477658983490299
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Feb 24 2023

Keywords

Comments

From Jon E. Schoenfield, Feb 26 2023: (Start)
For 2-digit indices n, the following rules can be applied to expedite the search for a(n):
Let P(n) be the concatenation of a(n) and n. Then P(n) is the product of n primes (counted with multiplicity), P(n) mod 100 = n, a(n) = floor(P(n)/100) is prime, and it can be shown that the following constraints apply to the prime factors of P(n):
If n is odd, then 2 cannot appear among the prime factors of P(n).
If n == 2 (mod 4), then 2 must appear with multiplicity exactly 1.
If n == 4 (mod 8), then 2 must appear with multiplicity >= 3.
If n == 0 (mod 8), then 2 must appear with multiplicity exactly 2.
If n != 0 (mod 5), then 5 cannot appear among the prime factors of P(n).
If n == 0 (mod 5) but n != 0 (mod 25), then 5 must appear with multiplicity 1.
If n == 0 (mod 25), then 5 must appear with multiplicity >= 2.
Any prime q that divides n but does not divide 10 cannot appear among the prime factors of P(n).
For example, for n = 24, the following constraints apply to the primes that appear among the 24 prime factors of P(24):
since 8 | n, exactly two are 2's;
since 5 !| n, none are 5's;
since 3 | n, none are 3's;
so P(24) >= 2^2 * 7^22. As it turns out, P(24) = 123883192874635318124 = 2^2 * 7^19 * 11 * 13 * 19. (End)
a(924) = floor(2^2 * 13^907 * 17^9 * 19^5 * 31 / 1000) = 8.0881...*10^1026. - Jon E. Schoenfield, Mar 03 2023

Examples

			a(5) = 67 because 67 is prime and 675 = 3^3 * 5^2 with A001222(675) = 3+2 = 5, and no smaller prime works.
		

Crossrefs

Programs

  • Maple
    icat:= proc(a,b) 10^(1+ilog10(b))*a+b end proc:
    f:= proc(n) local p;
    p:= 1;
    do
      p:= nextprime(p);
      if numtheory:-bigomega(icat(p,n)) = n then return p fi;
    od
    end proc:
    map(f, [$1..17]); # Robert Israel, Feb 24 2023

Formula

A001222(A066686(a(n),n)) = n.

Extensions

a(18) and a(21)-a(27) from Jon E. Schoenfield, Feb 24 2023
Showing 1-9 of 9 results.