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

A302566 a(n) is the least positive integer not yet in the sequence in which the largest digit of a(n-2) appears among its digits, and a(n) cannot share digits with a(n-1); a(1) = 1, a(2) = 2.

Original entry on oeis.org

1, 2, 10, 22, 11, 20, 13, 24, 3, 4, 23, 14, 30, 41, 32, 40, 31, 42, 33, 44, 35, 46, 5, 6, 15, 26, 45, 16, 25, 36, 50, 61, 52, 60, 51, 62, 53, 64, 55, 63, 54, 66, 57, 68, 7, 8, 17, 28, 37, 18, 27, 38, 47, 58, 67, 48, 70, 81, 72, 80, 71, 82, 73, 84, 75, 83, 74, 85, 76, 88, 77, 86, 79, 108, 9, 78, 19, 87
Offset: 1

Views

Author

Enrique Navarrete, Apr 09 2018

Keywords

Comments

The only pairs of consecutive numbers are 1, 2; 3, 4; 5, 6; 7, 8.
The 2-digit numbers that are not in the sequence are 12, 21, 34, 43, 56, 65, 89, 98 (78 and 87 do appear at n = 76 and n = 78, respectively).
The last 2-digit number to appear is 91 at n = 113.
Starting from a(73) = 79, the first term of alternating terms must contain 9, and the second term must contain 8.
If the initial terms of this sequence are swapped (by defining a(1)=2 and a(2)=1) then the resulting sequence is identical to this for n>12. - R. J. Cano, Apr 13 2018

Examples

			a(4) = 22 since it contains the largest digit from a(2) = 2, and can't be 12 since the digit 1 appears in a(3) = 10.
		

Crossrefs

Programs

  • Mathematica
    Nest[Append[#, Block[{k = 2, d}, While[Nand[FreeQ[#[[All, 1]], k], MemberQ[Set[d, IntegerDigits[k]], Max[#[[-2, -1]] ] ], ! IntersectingQ[d, #[[-1, -1]]] ], k++]; {k, d}]] &, Transpose@ {#, IntegerDigits@ #} &@ Range[2], 73][[All, 1]] (* Michael De Vlieger, Apr 12 2018 *)
  • PARI
    \\ See Links section.

A303294 a(n) is the least positive integer not yet in the sequence which shares a digit with either a(n-3) or a(n-2) (or with both), but shares no digit with a(n-1); a(1)=0, a(2)=1, a(3)=2.

Original entry on oeis.org

0, 1, 2, 10, 22, 11, 20, 13, 24, 3, 4, 12, 30, 14, 23, 15, 26, 5, 6, 21, 35, 16, 25, 17, 28, 7, 8, 27, 18, 29, 31, 9, 32, 19, 33, 41, 36, 40, 37, 42, 38, 44, 39, 45, 63, 47, 50, 34, 51, 43, 52, 46, 53, 48, 55, 49, 56, 74, 58, 60, 54, 61, 57, 62, 59
Offset: 1

Views

Author

Enrique Navarrete, Apr 20 2018

Keywords

Comments

Apparently there exist only 5 pairs of consecutive integers belonging this sequence, a(k+1)-a(k)=1 for k in (1,2,10,18,26). Respectively those pairs are: (0;1), (1;2), (3;4), (5;6), and (7;8).
It seems that a(j)=j only for j in (12,14,31,53,55,60,71,73,75,82,84,95,102). - R. J. Cano, Apr 22 2018

Examples

			a(10)=3 since it shares a digit (3) with a(8)=13, and shares no digit with a(9)=24.
		

Crossrefs

Programs

  • PARI
    See Cano link.

A302388 a(n) is the least positive integer not yet in the sequence in which the largest digit of a(n-3) appears among its digits; a(1)=1, a(2)=2, a(3)=3.

Original entry on oeis.org

1, 2, 3, 10, 12, 13, 11, 20, 23, 14, 21, 30, 4, 22, 31, 24, 25, 32, 34, 5, 33, 40, 15, 35, 41, 45, 50, 42, 51, 52, 43, 53, 54, 44, 55, 56, 46, 57, 6, 16, 7, 26, 36, 17, 60, 61, 27, 62, 63, 37, 64, 65, 47, 66, 67, 70, 68, 71, 72, 8, 73, 74, 18, 75, 76, 28, 77, 78, 38, 79, 48, 58, 9, 80
Offset: 1

Views

Author

Enrique Navarrete, Apr 06 2018

Keywords

Comments

The only fixed points are 1,2,3,99.
Starting from a(87)=89, every term must contain a 9.
First differences are bounded by -64 and 71.

Examples

			a(7)=11 since the largest digit of a(4)=10 is 1, and 11 is the least positive integer at n=7 that contains 1.
		

Crossrefs

Programs

  • Mathematica
    Nest[Append[#, Block[{k = 4, d}, While[Nand[FreeQ[#[[All, 1]], k], MemberQ[Set[d, IntegerDigits[k]], Max[#[[-3, -1]] ] ] ], k++]; {k, d}]] &, Transpose@ {#, IntegerDigits@ #} &@ Range[3], 71][[All, 1]] (* Michael De Vlieger, Apr 12 2018 *)
  • PARI
    firstTerms(m)={my(Seq:list=List([1,2,3]),z,cp,r,ok);cp=vector(10,u,u-1);for(i=4,m,z=vecmax(digits(Seq[i-3]));for(t=1,oo,forvec(y=vector(t,u,[1,#cp]),ok=0;for(j=1,t,if(cp[y[j]]==z,ok=1;break));if(ok,r=fromdigits(vector(t,u,cp[y[u]]));for(w=1,#Seq,if(r==Seq[w],ok=0;break));if(ok,listput(Seq,r);break(2))))));return(Seq)} \\ R. J. Cano, Apr 14 2018
Showing 1-3 of 3 results.