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.

A222293 Conjectured total number of times that k+n appears in the Collatz (3x+1) sequence of k for k = 1, 2, 3,...

Original entry on oeis.org

37, 30, 34, 30, 31, 29, 28, 38, 42, 32, 40, 40, 49, 30, 40, 40, 54, 45, 46, 40, 49, 44, 41, 48, 47, 54, 48, 41, 50, 44, 54, 45, 49, 60, 53, 47, 54, 50, 56, 44, 48, 50, 54, 47, 54, 38, 56, 47, 60, 48, 63, 48, 47, 45, 56, 53, 49, 49, 62, 52, 50, 54, 53, 52, 49, 46
Offset: 1

Views

Author

T. D. Noe, Feb 22 2013

Keywords

Examples

			a(1) = 37 because k+1 occurs in the Collatz sequence of k for the 37 values in A070993.
		

Crossrefs

Cf. A070993, A221213 (k-n).

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 75; t = Table[0, {nn}]; lastChange = 10; k = 0; While[k < 2*lastChange, k++; c = Collatz[k]; d = Intersection[Range[nn], c - k]; If[Length[d] > 0, lastChange = k; t[[d]]++]]