The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A067255 Irregular triangle read by rows: row n gives exponents in prime factorization of n. 52

%I #39 Aug 27 2023 08:43:16

%S 0,1,0,1,2,0,0,1,1,1,0,0,0,1,3,0,2,1,0,1,0,0,0,0,1,2,1,0,0,0,0,0,1,1,

%T 0,0,1,0,1,1,4,0,0,0,0,0,0,1,1,2,0,0,0,0,0,0,0,1,2,0,1,0,1,0,1,1,0,0,

%U 0,1,0,0,0,0,0,0,0,0,1,3,1,0,0,2,1,0,0,0,0,1,0,3,2,0,0,1,0,0,0,0,0,0,0,0,0,1

%N Irregular triangle read by rows: row n gives exponents in prime factorization of n.

%C Row lengths are given by A061395(n), n >= 2: [1, 2, 1, 3, 2, 4, 1, 2, ... ].

%C This sequence contains every finite sequence of nonnegative integers. - _Franklin T. Adams-Watters_, Jun 22 2005

%H Reinhard Zumkeller, <a href="/A067255/b067255.txt">Rows n = 1..250 of triangle, flattened</a>

%H Jeppe Stig Nielsen, <a href="http://jeppesn.dk/prim-eksp.text">See this explanation.</a>

%e 1 = 2^0

%e 2 = 2^1

%e 3 = 2^0 3^1

%e 4 = 2^2

%e 5 = 2^0 3^0 5^1

%e 6 = 2^1 3^1

%e ... and reading the exponents gives the sequence.

%e Since for example 99=2^0*3^2*5^0*7^0*11^1, we use this symbol for ninety-nine: 99: {0,2,0,0,1}. Concatenating all the symbols for 1,2,3,4,5,6,..., we get the sequence.

%t f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; Array[f, 29] // Flatten (* _Michael De Vlieger_, Mar 08 2019 *)

%o (Haskell)

%o a067255 n k = a067255_tabf !! (n-1) !! (k-1)

%o a067255_row 1 = [0]

%o a067255_row n = f n a000040_list where

%o f 1 _ = []

%o f u (p:ps) = g u 0 where

%o g v e = if m == 0 then g v' (e + 1) else e : f v ps

%o where (v',m) = divMod v p

%o a067255_tabf = map a067255_row [1..]

%o -- _Reinhard Zumkeller_, Jun 11 2013

%Y Cf. A133457.

%Y Cf. A001222 (row sums), A061395 (lengths of rows n >= 2).

%Y Cf. A007814 (left edge), A071178 (right edge).

%Y Cf. A082786 (same as regular triangle).

%Y For other triangle versions see A060175, A143078.

%Y Cf. A054841, rows reversed and concatenated into a decimal number.

%K easy,nonn,tabf

%O 1,5

%A _Jeppe Stig Nielsen_, Feb 20 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 08:30 EDT 2024. Contains 373102 sequences. (Running on oeis4.)