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

A082399 a(1) = 1; thereafter, a(n) is the smallest nonnegative number such that the number Sum_{i=1..n} a(i)*10^(n-i) is divisible by n.

Original entry on oeis.org

1, 0, 2, 0, 0, 0, 5, 6, 4, 0, 5, 10, 2, 2, 5, 6, 16, 8, 14, 0, 7, 18, 19, 2, 5, 10, 6, 0, 25, 20, 2, 20, 17, 12, 20, 28, 13, 4, 13, 30, 16, 20, 36, 4, 35, 28, 28, 16, 29, 10, 39, 14, 12, 4, 50, 20, 14, 24, 7, 50, 14, 54, 55, 18, 10, 44, 62, 52, 63, 50, 7, 18, 6, 62, 55, 54, 54, 54, 35, 10
Offset: 1

Views

Author

N. J. A. Sloane, Feb 08 2009

Keywords

Comments

Suggested by studying A144688. If all a(n) had turned out to be in the range 0 to 9 then this sequence would have produced a counterexample to the assertion that A144688 is finite.
The old entry with this A-number was a duplicate of A080825.

Examples

			After we have the first 11 terms, 1,0,2,0,0,0,5,6,4,0,5, the next number x must be chosen so that 102000564050 + x is divisible by 12; this implies that x = 10.
		

Crossrefs

See A051883 for another version. Cf. A144688.

Programs

  • Maple
    M:=80; a[1]:=1; N:=1;
    for n from 2 to M do
    N:=10*N; t2:=N mod n;
    if t2 = 0 then a[n]:=0; else a[n]:=n-t2; fi;
    N:=N+a[n]; od: [seq(a[n],n=1..M)];

A082404 Triangle in which n-th row gives trajectory of n under the map x -> x/2 if x is even, x -> x-1 if x is odd, stopping when we reach 1.

Original entry on oeis.org

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

Views

Author

Cino Hilliard, Apr 14 2003

Keywords

Comments

If you write down 0 when dividing by 2, 1 when subtracting 1, the trajectory gives the binary expansion of n.
The length of the n-th row of the triangle is A056792(n). - Nathaniel Johnston, Apr 21 2011

Examples

			Triangle begins:
  1;
  2, 1;
  3, 2, 1;
  4, 2, 1,
  5, 4, 2, 1;
  6, 3, 2, 1;
  7, 6, 3, 2, 1;
  8, 4, 2, 1;
  9, 8, 4, 2, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A082404 := proc(n,k) option remember: if(k = 1)then return n:elif(A082404(n,k-1) mod 2 = 0)then return A082404(n,k-1)/2: else return A082404(n,k-1)-1: fi: end:
    for n from 1 to 20 do k:=1: while A082404(n,k)>=1 do printf("%d, ",A082404(n,k)); k:=k+1: od:printf("\n");od: # Nathaniel Johnston, Apr 21 2011

Formula

T(n, 1) = n, T(n, 2) = A029578(n).

Extensions

More terms and changed offset from Nathaniel Johnston, Apr 21 2011

A081169 Triangle in which n-th row gives trajectory of n (including n itself) under the map x -> x/2 if x is even, x -> 3*x-1 if x is odd, stopping when reaching 1, 5 or 17.

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 8, 4, 2, 1, 4, 2, 1, 5, 14, 7, 20, 10, 5, 6, 3, 8, 4, 2, 1, 7, 20, 10, 5, 8, 4, 2, 1, 9, 26, 13, 38, 19, 56, 28, 14, 7, 20, 10, 5, 10, 5, 11, 32, 16, 8, 4, 2, 1, 12, 6, 3, 8, 4, 2, 1, 13, 38, 19, 56, 28, 14, 7, 20, 10, 5, 14, 7, 20, 10, 5, 15, 44, 22, 11, 32, 16, 8, 4, 2, 1, 16
Offset: 1

Views

Author

Cino Hilliard, Apr 16 2003

Keywords

Comments

It is conjectured that the sequence will always end in one of three loops: 1, 2,1,1, ...; 5 14 7 20 10 5...; or 17 50 25 74 37 110 55 164 82 41 122 61 182 91 272 136 68 34 17...

Crossrefs

Cf. A080825.

Programs

  • PARI
    xnm3(n) = { print1(1" "2" "1" "); for(x=2,n, x1=x; print1(x1" "); while(x1>1, if(x1%2==0,x1/=2,x1 = 3*p-1); print1(x1" "); if(x1==5 || x1==17,break); ) ) }

A081170 Triangle in which n-th row gives trajectory of n (including n itself) under the map x -> x/2 if x is even, x -> x-3 if x is odd, stopping when reach 0 or 1.

Original entry on oeis.org

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

Views

Author

Cino Hilliard, Apr 16 2003

Keywords

Crossrefs

Cf. A080825.

Programs

  • PARI
    xn1m3(n) = { for(x=3,n, x1=x; print1(x1" "); while(x1>1, if(x1%2==0,x1/=2,x1=x1-3); print1(x1" "); ) ) }

A081171 Triangle in which n-th row gives trajectory of n (including n itself) under the map x -> x/2 if x is even, x -> 3x-3 if x is odd, stopping when reaching one of 1, 3, 5, 15, 51.

Original entry on oeis.org

1, 0, 2, 1, 3, 0, 4, 2, 1, 5, 2, 1, 6, 3, 7, 4, 2, 1, 8, 4, 2, 1, 9, 6, 3, 10, 5, 11, 8, 4, 2, 1, 12, 6, 3, 13, 10, 5, 14, 7, 4, 2, 1, 15, 12, 6, 3, 16, 8, 4, 2, 1, 17, 14, 7, 4, 2, 1, 18, 9, 6, 3, 19, 16, 8, 4, 2, 1, 20, 10, 5, 21, 18, 9, 6, 3, 22, 11, 8, 4, 2, 1, 23, 20, 10, 5, 24, 12, 6, 3, 25, 22
Offset: 1

Views

Author

Cino Hilliard, Apr 16 2003

Keywords

Crossrefs

Cf. A080825.

Programs

  • PARI
    xn1m3(n) = { for(x=1,n, x1=x; print1(x1" "); while(x1>1, if(x1%2==0,x1/=2,x1=3*x1-3); print1(x1" "); ) ) }
Showing 1-5 of 5 results.