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.

User: Moritz Franckenstein

Moritz Franckenstein's wiki page.

Moritz Franckenstein has authored 3 sequences.

A174498 Topswops (2): number of permutations of cards achieving A000376(n).

Original entry on oeis.org

1, 1, 2, 2, 1, 4, 2, 1, 1, 1, 1, 4, 1, 4, 2, 2, 1, 1, 2, 3
Offset: 1

Author

Moritz Franckenstein, Nov 28 2010

Keywords

Comments

This is for the topswops variation ending in sorted/identity permutation.

References

  • D. E. Knuth, TAOCP, Section 7.2.1.2, Problems 107-109.

Crossrefs

Cf. A000376.

Extensions

a(20)=3 by Moritz Franckenstein, Apr 16 2011.

A153012 Differences between adjacent digits of square root of 2.

Original entry on oeis.org

3, -3, 3, -2, -1, 2, 2, 1, -4, 1, 4, -4, -3, 9, -4, -5, 4, 4, 0, -8, 1, 5, 2, 0, -1, -5, 2, -2, -2, 9, -3, 3, -1, -8, 7, 1, -3, 1, 3, -3, 1, -6, 7, -1, -2, -2, 4, -1, 3, -5, 4, -8, 7, -4, -2, 6, -1, 0, 1, 2, -2, -4, 4, 2, 0, -9, 7, -4, -1, 2, 3, 1, -4, 2, -4, -1, -1, 7, -7, 3, 5, 0, -3, -5, 3, 5
Offset: 1

Author

Moritz Franckenstein, Dec 16 2008

Keywords

Crossrefs

A002193 Decimal expansion of square root of 2.

Programs

  • Mathematica
    Differences[RealDigits[Sqrt[2],10,120][[1]]] (* Harvey P. Dale, Sep 02 2015 *)

A152960 Output of linear congruential pseudo-random generator 134775813 for signed 32-bit values.

Original entry on oeis.org

0, 1, 134775814, -596792289, 870078620, 1172187917, -1410233534, 1368768587, 694906232, 1598751577, 1828254910, 352239543, 2039224980, 303092965, -683524998, 256513635, 1259699184, -355259471, 1580146294, -967806897, 1408429452, -1298476099, -669280590
Offset: 0

Author

Moritz Franckenstein, Dec 16 2008

Keywords

Comments

A widely used pseudo-random number generator, for example all Delphi-Versions until now use it for their "Random" function.
It can be shown that the sequence has full period (its length is 2^32).

Crossrefs

Cf. A384404 (internal state).

Programs

  • Delphi
    // implementation using Delphi's built-in random() function
    var
    I: Integer;
    begin
    Randseed:= 0;
    for I:= 1 to 100 do begin
    Write(Randseed, ',');
    Random;
    end;
    end.
    
  • Mathematica
    nn=30; t = {x = 0}; Do[x = Mod[134775813 x + 1, 2^32]; If[x > 2^31, x = x - 2^32]; AppendTo[t, x], {nn}]; t (* T. D. Noe, Dec 18 2012 *)
  • PARI
    step(n)=(134775813*n+1)%2^32 \\ Charles R Greathouse IV, Sep 10 2015
    
  • PARI
    a(n)=lift((Mod(134775813,2^34)^n-1)/33693953)/4 \\ Charles R Greathouse IV, Sep 10 2015

Formula

a(n+1) = (134775813 * a(n) + 1) (mod 2^32) (representatives for the equivalence classes by interpreting the bit-patterns as two's complement).