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

A068149 Triangular numbers in which neighboring digits differ at most by 1. Allowed neighbors of 9 are 0, 8 and 9.

Original entry on oeis.org

0, 1, 3, 6, 10, 21, 45, 55, 66, 78, 210, 666, 990, 2211, 3321, 5565, 6555, 8778, 10011, 90100, 112101, 222111, 232221, 443211, 887778, 5433456, 5456556, 5656566, 5676765, 22221111, 22321221, 34565455, 88877778, 211099878, 212210901
Offset: 1

Views

Author

Amarnath Murthy, Feb 23 2002

Keywords

Comments

Includes (2 * 10^(2*k) - 10^k - 1)/9 and (8 * 10^(2*k) - 10^(k+1) + 2)/9 for k >= 1, and (2 * 10^(2*k) + 89 * 10^k + 989)/9 for k >= 2. - Robert Israel, Sep 22 2024

Crossrefs

Intersection of A000217 and A376425.

Programs

  • Maple
    f:= proc(n) local i;
       seq(10*n+i, i= sort([n-1, n, n+1] mod 10))
    end proc:
    istri:= proc(n) issqr(1+8*n) end proc:
    S:= [$1..9]: R:= 0,1,3,6: count:= 4:
    for i from 1 while count < 95 do
      for k from i to i+1 do
        for s in S do
          tmin:= ceil(sqrt(8*s*10^k+1));
          if tmin::even then tmin:= tmin+1 fi;
          for t from tmin to floor(sqrt(8*(s+1)*10^k-7)) by 2 do
            x:= (t-1)/2; y:= x*(x+1)/2;
            L:= convert(y,base,10);
            if convert(L[2..-1]-L[1..-2] mod 10, set) subset {0,1,9} then
              R:= R,y; count:= count+1;
      fi od od od;
      if count < 95 then S:= map(f, S) fi;
    od:
    R; # Robert Israel, Sep 23 2024
  • Mathematica
    Do[a = IntegerDigits[n(n + 1)/2]; k = 1; l = Length[a]; While[k < l && (Abs[a[[k]]- a[[k + 1]]] < 2 || Abs[a[[k]] - a[[k + 1]]] > 8), k++ ]; If[k == l, Print[n(n + 1)/2]], {n, 0, 10^5} ]
    Select[Accumulate[Range[0,30000]],Max[Select[Abs[Differences[ IntegerDigits[ #]]], #!=9&]]<2&] (* Harvey P. Dale, Oct 09 2013 *)

Extensions

Edited and extended by Robert G. Wilson v and Sascha Kurz, Mar 01 2002
Offset changed by Andrew Howroyd, Sep 22 2024

A087553 Squares in which the neighboring digits differ at most by 1. Neighbors of 1 are 0 and 2, neighbors of 0 are 1 and 9.

Original entry on oeis.org

0, 1, 4, 9, 100, 121, 676, 900, 10000, 12100, 12321, 90000, 1000000, 1210000, 1232100, 1234321, 9000000, 100000000, 121000000, 123210000, 123432100, 123454321, 900000000, 10000000000, 11122233444, 12100000000, 12321000000, 12343210000
Offset: 1

Views

Author

Amarnath Murthy, Sep 13 2003

Keywords

Comments

The sequence is infinite with trivial terms like 10^(2k) and 9*10^(2k). Conjecture: There are infinitely many nontrivial terms.

Examples

			12321, 1345678987654321 are terms.
		

Crossrefs

Intersection of A000290 and A376425.

Extensions

More terms from Sascha Kurz, Sep 22 2003
Offset changed and 0 inserted by Andrew Howroyd, Sep 22 2024
Showing 1-2 of 2 results.