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.

Previous Showing 11-13 of 13 results.

A101202 Multiples of 142857.

Original entry on oeis.org

142857, 285714, 428571, 571428, 714285, 857142, 999999, 1142856, 1285713, 1428570, 1571427, 1714284, 1857141, 1999998, 2142855, 2285712, 2428569, 2571426, 2714283, 2857140, 2999997, 3142854, 3285711, 3428568, 3571425, 3714282, 3857139, 3999996, 4142853, 4285710
Offset: 1

Views

Author

Paul Boddington, Dec 12 2004

Keywords

Comments

This sequence is interesting because the first six terms are cyclic shifts of one another (in decimal).
The number 142857 is the only number such that every cyclic permutation of it is a multiple of it. This number, its double, and numbers formed from either of them by an arbitrary number of repetitions of its sequence of digits are the only ones which generate more than one multiple of themselves in the sequence of their cyclic permutations. See the Kraitchik reference. - Martin Renner, Mar 06 2014
Actually, the second claim by Kraitchik is incorrect. Indeed, there are other numbers which generate more than one multiple of themselves, for example 153846 * {3, 4} = {461538, 615384} and 230769 * {3, 4} = {692307, 923076}. - Giovanni Resta, Mar 11 2014
The digits of each term can be partitioned into two parts with the right part always consisting of 3 digits and the left part containing all the remaining digits; adding then those two numbers will yield a sum which is multiple of 999: (142+857)/999 = 1 .. (857+142)/999 = 1 (999+999)/999 = 2 (1142+856)/999 = 2 .. (1857+141)/999 = 2 (2142+855)/999 = 3 .. (2857+140)/999 = 3 (2999+997)/999 = 4 .. As a result of above operations the sequence A054896 starting with the term 8 is produced. - Alexander R. Povolotsky, Nov 02 2007
1/7 = 0.142857142857142857... - Harvey P. Dale, Aug 26 2014

References

  • Maurice Kraitchik, Mathematical Recreations, New York, Dover (2nd. ed.) 1953, p. 75-76.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 142857 at pp. 179-183.

Crossrefs

Cf. A054896.

Programs

  • Mathematica
    CoefficientList[Series[142857/(1 - x)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Mar 13 2014 *)
    142857*Range[30] (* Harvey P. Dale, Aug 26 2014 *)

Formula

G.f.: 142857*x/(1-x)^2. - Alexander R. Povolotsky, Apr 26 2008
a(n) = 142857*n. - Robert Israel, May 14 2008
E.g.f.: 142857*x*exp(x). - Stefano Spezia, Sep 18 2024

A175417 Exponent of 2 minus sum of all other exponents, in the prime power factorization of n!

Original entry on oeis.org

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

Views

Author

Zak Seidov, May 08 2010

Keywords

Comments

a(n)=0 for n={0,1,3,7,11,13,14,18,20}.

Examples

			a(20) = 0 because 20! = 2432902008176640000 = ((2^18)*(3^8)*(5^4)*(7^2)*(11^1)*(13^1)*(17^1)*(19^1)) and 18-(8+4+2+1+1+1+1) = 0.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t,p,k;
          p:= 2: t:= add(floor(n/2^k),k=1..ilog2(n)):
          do
            p:= nextprime(p);
            if n < p then return t fi;
            t:= t - add(floor(n/p^k),k=1..ilog[p](n))
          od
    end proc:
    map(f, [$0..100]); # Robert Israel, Nov 10 2024
  • Mathematica
    Table[2*IntegerExponent[m!,2]-Total[Last/@FactorInteger[m! ]],{m,0,130}]

Formula

a(n)=2*A011371(n)-A022559(n).

A381886 Triangle read by rows: T(n, k) = Sum_{j=1..floor(log[k](n))} floor(n / k^j) if k >= 2, T(n, 1) = n, T(n, 0) = 0^n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 1, 1, 0, 4, 3, 1, 1, 0, 5, 3, 1, 1, 1, 0, 6, 4, 2, 1, 1, 1, 0, 7, 4, 2, 1, 1, 1, 1, 0, 8, 7, 2, 2, 1, 1, 1, 1, 0, 9, 7, 4, 2, 1, 1, 1, 1, 1, 0, 10, 8, 4, 2, 2, 1, 1, 1, 1, 1, 0, 11, 8, 4, 2, 2, 1, 1, 1, 1, 1, 1, 0, 12, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Peter Luschny, Apr 03 2025

Keywords

Examples

			Triangle starts:
  [ 0] 1;
  [ 1] 0,  1;
  [ 2] 0,  2,  1;
  [ 3] 0,  3,  1, 1;
  [ 4] 0,  4,  3, 1, 1;
  [ 5] 0,  5,  3, 1, 1, 1;
  [ 6] 0,  6,  4, 2, 1, 1, 1;
  [ 7] 0,  7,  4, 2, 1, 1, 1, 1;
  [ 8] 0,  8,  7, 2, 2, 1, 1, 1, 1;
  [ 9] 0,  9,  7, 4, 2, 1, 1, 1, 1, 1;
  [10] 0, 10,  8, 4, 2, 2, 1, 1, 1, 1, 1;
  [11] 0, 11,  8, 4, 2, 2, 1, 1, 1, 1, 1, 1;
  [12] 0, 12, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Cf. A011371 (column 2), A054861 (column 3), A054893 (column 4), A027868 (column 5), A054895 (column 6), A054896 (column 7), A054897 (column 8), A054898 (column 9), A078651 (row sums).

Programs

  • Maple
    T := (n, b) -> local i; ifelse(b = 0, b^n, ifelse(b = 1, n, add(iquo(n, b^i), i = 1..floor(log(n, b))))): seq(seq(T(n, b), b = 0..n), n = 0..12);
    # Alternative:
    T := (n, k) -> local j; ifelse(k = 0, k^n, ifelse(k = 1, n, add(padic:-ordp(j, k), j = 1..n))): for n from 0 to 12 do seq(T(n, k), k = 0..n) od;
  • Mathematica
    T[n_, 0] := If[n == 0, 1, 0]; T[n_, 1] := n;
    T[n_, k_] := Last@Accumulate[IntegerExponent[Range[n], k]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // MatrixForm
    (* Alternative: *)
    T[n_, k_] := Sum[Floor[n/k^j], {j, Floor[Log[k, n]]}]; T[n_, 1] := n; T[n_, 0] := 0^n; T[0, 0] = 1; Flatten@ Table[T[n, k], {n, 0, 12}, {k, 0, n}] (* Michael De Vlieger, Apr 03 2025 *)
  • PARI
    T(n,k) = if (n==0, 1, if (n==1, k, if (k==0, 0, if (k==1, n, sum(j=1, n, valuation(j, k))))));
    row(n) = vector(n+1, k, T(n,k-1)); \\ Michel Marcus, Apr 04 2025
  • Python
    from math import log
    def T(n: int, b: int) -> int:
        return (b**n if b == 0 else n if b == 1 else
            sum(n // (b**i) for i in range(1, 1 + int(log(n, b)))))
    print([[T(n, b) for b in range(n+1)] for n in range(12)])
    
  • SageMath
    def T(n, b): return (b^n if b == 0 else n if b == 1 else sum(valuation(j, b) for j in (1..n)))
    print(flatten([[T(n, b) for b in range(n+1)] for n in srange(13)]))
    

Formula

T(n, k) = Sum_{j=1..n} valuation(j, k) for n >= 2.
Previous Showing 11-13 of 13 results.