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

A367610 Comma transform of A367362.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 21, 22, 23, 24, 25, 26, 27, 28, 29, 33, 31, 32, 33, 34, 35, 36, 37, 38, 39, 44, 41, 42, 43, 44, 45, 46, 47, 48, 49, 55, 51, 52, 53, 54, 55, 56, 57, 58, 59, 66, 61, 62, 63, 64, 65, 66, 67, 68, 69, 77, 71, 72, 73, 74, 75, 76, 77, 78, 79
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2023

Keywords

Comments

This is the second-order comma transform of the nonnegative integers.
See A367360 for further information.

Crossrefs

Programs

  • Python
    from itertools import count, islice, pairwise
    def S(): yield from (str(i) for i in count(0))
    def C(): yield from (str(int(t[-1]+u[0])) for t, u in pairwise(S()))
    def a(): yield from (int(t[-1]+u[0]) for t, u in pairwise(C()))
    print(list(islice(a(), 80))) # Michael S. Branicky, Dec 11 2023

A367360 Comma transform of squares.

Original entry on oeis.org

1, 14, 49, 91, 62, 53, 64, 96, 48, 11, 1, 11, 41, 91, 62, 52, 62, 93, 43, 14, 4, 14, 45, 95, 66, 56, 67, 97, 48, 19, 9, 11, 41, 91, 61, 51, 61, 91, 41, 11, 1, 11, 41, 91, 62, 52, 62, 92, 42, 12, 2, 12, 42, 92, 63, 53, 63, 93, 43, 13, 3, 13, 43, 94, 64, 54, 64, 94, 44, 14, 5, 15, 45, 95, 65, 55, 65, 96, 46, 16, 6, 16, 46, 97
Offset: 0

Views

Author

N. J. A. Sloane, Nov 22 2023

Keywords

Comments

To compute the comma transform of a sequence [b,c,d,e,f,...], concatenate the last digit of each term with the first digit of the following term. In other words, these are the numbers formed by the pairs of digits that surround the commas that separate the terms of the original sequence.
The comma transform CT(S) of a sequence S of positive numbers maps S into the set F consisting of finite or infinite sequences of positive numbers each with one or two digits. The inverse comma transform CTi maps an element of F to an element of F.
Inspired by Eric Angelini's A121805.

Examples

			The squares are 0, 1, 4, 9, 16, 25, ..., so the comma transform is [0]1, 14, 49, 91, 62, ...
		

Crossrefs

A166499 is the comma transform of the primes, A367361 of the powers of 2, A367362 of the nonnegative integers. See also A368362.

Programs

  • Maple
    Maple code for comma transform (CT(a)) of a sequence a:
    # leading digit, from A000030
    Ldigit:=proc(n) local v; v:=convert(n, base, 10); v[-1]; end;
    CT:=proc(a) local b,i; b:=[];
    for i from 1 to nops(a)-1 do
    b := [op(b), 10*(a[i] mod 10) + Ldigit(a[i+1])]; od: b; end;
    # Inverse comma transform of sequence A calculated in base "bas": - N. J. A. Sloane, Jan 03 2024
    bas := 10;
    Ldigit:=proc(n) local v; v:=convert(n, base, bas); v[-1]; end;
    CTi := proc(A) local B,i,L,R;
    for i from 1 to nops(A) do
       if A[i]>=bas^2 then error("all terms must have 1 or 2 digits"); fi; od:
    B:=Array(1..nops(A),-1);
    if A[1] >= bas then B[1]:= Ldigit(A[1]); L:=(A[1] mod bas);
    else B[1]:=10; L:=A[1];
    fi;
    for i from 2 to nops(A) do
      if A[i] >= bas then R := Ldigit(A[i]) else R:=0; fi;
      B[i] := L*bas + R;
      L := (A[i] mod bas);
    od;
    B;
    end;
    # second Maple program:
    a:= n-> parse(cat(""||(n^2)[-1],""||((n+1)^2)[1])):
    seq(a(n), n=0..99);  # Alois P. Heinz, Nov 22 2023
  • Mathematica
    a[n_]:=FromDigits[{Last[IntegerDigits[n^2]],First[IntegerDigits[(n+1)^2]]}];
    a/@Range[0,83] (* Ivan N. Ianakiev, Nov 24 2023 *)
  • Python
    from itertools import count, islice, pairwise
    def S(): yield from (str(i**2) for i in count(0))
    def agen(): yield from (int(t[-1]+u[0]) for t, u in pairwise(S()))
    print(list(islice(agen(), 84))) # Michael S. Branicky, Nov 22 2023
    
  • Python
    def A367360(n): return (0, 10, 40, 90, 60, 50, 60, 90, 40, 10)[n%10]+int(str((n+1)**2)[0]) # Chai Wah Wu, Dec 22 2023

Formula

a(n) = 10 * A008959(n) + A002993(n+1). - Alois P. Heinz, Nov 22 2023

A368362 Inverse comma transform of 1,2,3,4,5,...,99.

Original entry on oeis.org

10, 10, 20, 30, 40, 50, 60, 70, 80, 91, 1, 11, 21, 31, 41, 51, 61, 71, 81, 92, 2, 12, 22, 32, 42, 52, 62, 72, 82, 93, 3, 13, 23, 33, 43, 53, 63, 73, 83, 94, 4, 14, 24, 34, 44, 54, 64, 74, 84, 95, 5, 15, 25, 35, 45, 55, 65, 75, 85, 96, 6, 16, 26, 36, 46, 56, 66, 76, 86, 97, 7, 17, 27, 37, 47, 57, 67, 77, 87, 98, 8, 18, 28, 38, 48, 58, 68, 78, 88, 99, 9, 19, 29, 39, 49, 59, 69, 79, 89
Offset: 1

Views

Author

N. J. A. Sloane, Jan 03 2024

Keywords

Comments

See A367360 for further information.

Crossrefs

A369303 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused number whose string value contains the comma transform (cf. A367360) of the previous two terms.

Original entry on oeis.org

1, 2, 12, 21, 22, 112, 121, 210, 120, 10, 11, 13, 110, 31, 3, 113, 131, 231, 122, 111, 211, 123, 114, 310, 43, 4, 34, 143, 41, 134, 115, 141, 51, 15, 116, 151, 61, 16, 117, 161, 71, 17, 118, 171, 81, 18, 119, 181, 91, 19, 311, 93, 190, 312, 23, 220, 32, 30, 223, 20, 132, 14, 212, 42, 24, 221
Offset: 1

Views

Author

Scott R. Shannon, Jan 19 2024

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. The fixed points begin 1, 2, 10, 11, 2863, 3164, 3545, 3947, 6835, 6947, 7052, ... although it is likely there are infinitely more.

Examples

			a(3) = 12 as the comma transform of 1 and 2 is 12.
a(6) = 112 as the comma transform of 21 and 22 is 12, but 12 has already appeared so the next lowest unused number to contain '12' is 112.
		

Crossrefs

Showing 1-4 of 4 results.