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

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Jeppe Stig Nielsen, Feb 20 2002

Keywords

Comments

Row lengths are given by A061395(n), n >= 2: [1, 2, 1, 3, 2, 4, 1, 2, ... ].
This sequence contains every finite sequence of nonnegative integers. - Franklin T. Adams-Watters, Jun 22 2005

Examples

			1 = 2^0
2 = 2^1
3 = 2^0 3^1
4 = 2^2
5 = 2^0 3^0 5^1
6 = 2^1 3^1
... and reading the exponents gives the sequence.
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.
		

Crossrefs

Cf. A133457.
Cf. A001222 (row sums), A061395 (lengths of rows n >= 2).
Cf. A007814 (left edge), A071178 (right edge).
Other versions: A054841 (rows reversed and concatenated into a decimal number), A060175 (square array), A082786 (regular triangle), A124010 (with 0's removed, excepting row 1), A143078 (another irregular triangle).

Programs

  • Haskell
    a067255 n k = a067255_tabf !! (n-1) !! (k-1)
    a067255_row 1 = [0]
    a067255_row n = f n a000040_list where
       f 1 _      = []
       f u (p:ps) = g u 0 where
         g v e = if m == 0 then g v' (e + 1) else e : f v ps
                 where (v',m) = divMod v p
    a067255_tabf = map a067255_row [1..]
    -- Reinhard Zumkeller, Jun 11 2013
  • Mathematica
    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 *)

A141809 Irregular table: Row n (of A001221(n) terms, for n>=2) consists of the largest powers that divides n of each distinct prime that divides n. Terms are arranged by the size of the distinct primes. Row 1 = (1).

Original entry on oeis.org

1, 2, 3, 4, 5, 2, 3, 7, 8, 9, 2, 5, 11, 4, 3, 13, 2, 7, 3, 5, 16, 17, 2, 9, 19, 4, 5, 3, 7, 2, 11, 23, 8, 3, 25, 2, 13, 27, 4, 7, 29, 2, 3, 5, 31, 32, 3, 11, 2, 17, 5, 7, 4, 9, 37, 2, 19, 3, 13, 8, 5, 41, 2, 3, 7, 43, 4, 11, 9, 5, 2, 23, 47, 16, 3, 49, 2, 25, 3, 17, 4, 13, 53, 2, 27, 5, 11, 8, 7, 3
Offset: 1

Views

Author

Leroy Quet, Jul 07 2008

Keywords

Comments

In other words, except for row 1, row n contains the unitary prime power divisors of n, sorted by the prime. - Franklin T. Adams-Watters, May 05 2011
A034684(n) = smallest term of n-th row; A028233(n) = T(n,1); A053585(n) = T(n,A001221(n)); A008475(n) = sum of n-th row for n > 1. - Reinhard Zumkeller, Jan 29 2013

Examples

			60 has the prime factorization 2^2 * 3^1 * 5^1, so row 60 is (4,3,5).
From _M. F. Hasler_, Oct 12 2018: (Start)
The table starts:
    n : largest prime powers dividing n
    1 :  1
    2 :  2
    3 :  3
    4 :  4
    5 :  5
    6 :  2, 3
    7 :  7
    8 :  8
    9 :  9
   10 :  2, 5
   11 : 11
   12 :  4, 3
   etc. (End)
		

Crossrefs

A027748, A124010 are used in a formula defining this sequence.
Cf. A001221 (row lengths), A008475 (row sums), A028233 (column 1), A034684 (row minima), A053585 (right edge).

Programs

  • Haskell
    a141809 n k = a141809_row n !! (k-1)
    a141809_row 1 = [1]
    a141809_row n = zipWith (^) (a027748_row n) (a124010_row n)
    a141809_tabf = map a141809_row [1..]
    -- Reinhard Zumkeller, Mar 18 2012
    
  • Mathematica
    f[{x_, y_}] := x^y; Table[Map[f, FactorInteger[n]], {n, 1, 50}] // Grid (* Geoffrey Critzer, Apr 03 2015 *)
  • PARI
    A141809_row(n)=if(n>1, [f[1]^f[2]|f<-factor(n)~], [1]) \\ M. F. Hasler, Oct 12 2018, updated Aug 19 2022

Formula

T(n,k) = A027748(n,k)^A124010(n,k) for n > 1, k = 1..A001221(n). - Reinhard Zumkeller, Mar 15 2012

A249344 A(n,k) = exponent of the largest power of n-th prime which divides k, square array read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Oct 28 2014

Keywords

Comments

Square array A(n,k), where n = row, k = column, read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ... (transpose of array A060175).
A(n,k) is the (p_n)-adic valuation of k, where p_n is the n-th prime, A000040(n).
Each row is effectively a ruler function, s, with s(1) = 0. - Peter Munn, Apr 30 2022

Examples

			The top-left corner of the array:
  0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ...
  0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, ...
  0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ...
  0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, ...
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ...
  ...
A(1,8) = 3, because 2^3 is the largest power of 2 (= p_1 = A000040(1)) that divides 8.
a(2,9) = 2, because 3^2 is the largest power of 3 (= p_2) that divides 9.
a(3,15) = 1, because 5^1 is the largest power of 5 (= p_3) that divides 15.
		

Crossrefs

Transpose: A060175.
Row 1: A007814.
Row 2: A007949.
Row 3: A112765.
Row 4: A214411.
Completely additive sequences where more than one prime is mapped to 1, all other primes to 0: A065339, A083025, A087436, A169611.
Ruler functions, s, with s(1) = 0 that are not rows here: A122840, A122841, A235127, A244413.

Programs

  • Mathematica
    A[n_, k_] := IntegerExponent[k, Prime[n]]; Table[A[k, n - k + 1], {n, 1, 15}, {k, 1, n}] // Flatten (* Amiram Eldar, Oct 01 2023 *)
  • PARI
    a(n, k) = valuation(k, prime(n)); \\ Michel Marcus, Jun 24 2017
  • Python
    from sympy import prime
    def a(n, k):
        p=prime(n)
        i=z=0
        while p**i<=k:
            if k%(p**i)==0: z=i
            i+=1
        return z
    for n in range(1, 10): print([a(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 24 2017
    
  • Scheme
    (define (A249344 n) (A249344bi (A002260 n) (A004736 n)))
    (define (A249344bi row col) (let ((p (A000040 row))) (let loop ((n col) (i 0)) (cond ((not (zero? (modulo n p))) i) (else (loop (/ n p) (+ i 1)))))))
    

Formula

Row n, as a sequence, is completely additive with A(n, prime(n)) = 1, A(n, prime(m)) = 0 for m <> n. - Peter Munn, Apr 30 2022
Sum_{k=1..m} A(n,k) ~ (1/(prime(n)-1)) * m. - Amiram Eldar, Oct 01 2023

A060176 Square array A(n,k) = the largest power of k-th prime which divides n, read by falling antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 9, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Henry Bottomley, Mar 14 2001

Keywords

Comments

Product of terms on row n is n.

Examples

			The top left corner of the array:
  n\k |  1   2   3   4   5   6   7   8
  ----+---------------------------------
   1  |  1,  1,  1,  1,  1,  1,  1,  1,
   2  |  2,  1,  1,  1,  1,  1,  1,  1,
   3  |  1,  3,  1,  1,  1,  1,  1,  1,
   4  |  4,  1,  1,  1,  1,  1,  1,  1,
   5  |  1,  1,  5,  1,  1,  1,  1,  1,
   6  |  2,  3,  1,  1,  1,  1,  1,  1,
   7  |  1,  1,  1,  7,  1,  1,  1,  1,
   8  |  8,  1,  1,  1,  1,  1,  1,  1,
   9  |  1,  9,  1,  1,  1,  1,  1,  1,
  10  |  2,  1,  5,  1,  1,  1,  1,  1,
  11  |  1,  1,  1,  1, 11,  1,  1,  1,
  12  |  4,  3,  1,  1,  1,  1,  1,  1,
  13  |  1,  1,  1,  1,  1, 13,  1,  1,
  14  |  2,  1,  1,  7,  1,  1,  1,  1,
  15  |  1,  3,  5,  1,  1,  1,  1,  1,
  16  | 16,  1,  1,  1,  1,  1,  1,  1,
  17  |  1,  1,  1,  1,  1,  1, 17,  1,
  18  |  2,  9,  1,  1,  1,  1,  1,  1,
  19  |  1,  1,  1,  1,  1,  1,  1, 19,
  ...
a(12,1) = 4 since 4 = 2^2 = prime(1)^2 divides 12 but 8 = 2^3 does not.
		

Crossrefs

Columns include A006519, A038500.

Programs

  • PARI
    up_to = 105;
    A060176sq(n,k) = (prime(k)^valuation(n,prime(k)));
    A060176list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A060176sq(col,(a-(col-1))))); (v); };
    v060176 = A060176list(up_to);
    A060176(n) = v060176[n]; \\ Antti Karttunen, Jan 16 2025

Formula

A(n, k) = A000040(k)^A060175(n, k).

Extensions

Edited by Antti Karttunen, Jan 16 2025

A249422 Transpose of square array A249421.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 3, 2, 17, 0, 0, 0, 0, 0, 0, 0, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 6, 1, 14, 12, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 10, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 6, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 13, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 8, 11
Offset: 1

Views

Author

Antti Karttunen, Oct 28 2014

Keywords

Comments

See comments at A249421.

Crossrefs

Programs

A334215 T(n, k) is the greatest positive integer m such that m^k divides n; square array T(n, k), n, k > 0 read by antidiagonals downwards.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 19 2020

Keywords

Examples

			Square array starts:
  n\k|   1  2  3  4  5  6  7  8  9 10
  ---+-------------------------------
    1|   1  1  1  1  1  1  1  1  1  1
    2|   2  1  1  1  1  1  1  1  1  1
    3|   3  1  1  1  1  1  1  1  1  1
    4|   4  2  1  1  1  1  1  1  1  1
    5|   5  1  1  1  1  1  1  1  1  1
    6|   6  1  1  1  1  1  1  1  1  1
    7|   7  1  1  1  1  1  1  1  1  1
    8|   8  2  2  1  1  1  1  1  1  1
    9|   9  3  1  1  1  1  1  1  1  1
   10|  10  1  1  1  1  1  1  1  1  1
   11|  11  1  1  1  1  1  1  1  1  1
   12|  12  2  1  1  1  1  1  1  1  1
   13|  13  1  1  1  1  1  1  1  1  1
   14|  14  1  1  1  1  1  1  1  1  1
   15|  15  1  1  1  1  1  1  1  1  1
   16|  16  4  2  2  1  1  1  1  1  1
		

Crossrefs

Programs

  • PARI
    T(n,k) = { my (f=factor(n)); prod (i=1, #f~, f[i,1]^(f[i,2]\k)) }

Formula

T(n, 1) = n.
T(n, 2) = A000188(n).
T(n, 3) = A053150(n).
T(n, 4) = A053164(n).
T(n, A051903(n)) = A261969(n).
T(n, k) = 1 for any k > A051903(n).
T(n^k, k) = n.

A298155 For any n >= 0 and k > 0, the prime(k)-adic valuation of a(n) equals the prime(k)-adic valuation of n + k (where prime(k) denotes the k-th prime).

Original entry on oeis.org

1, 6, 5, 28, 3, 2, 11, 4680, 1, 2, 357, 76, 5, 6, 23, 16, 9, 770, 1, 348, 403, 2, 75, 8, 7, 1998, 1, 340, 1353, 86, 19, 672, 235, 26, 9, 4, 1, 36570, 7, 88, 3, 2, 295, 2196, 17, 98, 39, 400, 1943, 114, 11, 8804, 68985, 2, 1, 24, 1, 790, 3, 364, 1909, 3366, 185
Offset: 0

Views

Author

Rémy Sigrist, Jan 13 2018

Keywords

Comments

This sequence has similarities with A102370: here, for k > 0, a(n) and n + k have the same prime(k)-adic valuation, there, for k >= 0, A102370(n) and n + k have the same k-th binary digit (the least significant binary digit having index 0).
For any positive number, say k, we can use the Chinese remainder theorem to find a term that is a multiple of k; this term has index < k.
a(n) is even iff n is odd.
See A298161 for the indices of ones in the sequence.

Examples

			For n = 7:
- the 2-adic valuation of 7 + 1 is 3,
- the 3-adic valuation of 7 + 2 is 2,
- the 5-adic valuation of 7 + 3 is 1,
- the 7-adic valuation of 7 + 4 is 0,
- the 11-adic valuation of 7 + 5 is 0,
- the 13-adic valuation of 7 + 6 is 1,
- for k > 6, the prime(k)-adic valuation of 7 + k is 0,
- hence a(7) = 2^3 * 3^2 * 5^1 * 13^1 = 4680.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local v, p, k;
      v:= 1: p:= 1:
      for k from 1 do
        p:= nextprime(p);
        if p > n+k then return v fi;
        v:= v * p^padic:-ordp(n+k,p)
      od
    end proc:
    map(f, [$0..100]); # Robert Israel, Jan 16 2018
  • Mathematica
    f[n_] := Module[{v = 1, p = 1, k}, For[k = 1, True, k++, p = NextPrime[p]; If[p > n + k, Return[v]]; v *= p^IntegerExponent[n + k, p]]];
    f /@ Range[0, 100] (* Jean-François Alcover, Jul 30 2020, after Maple *)
  • PARI
    a(n) = my (v=1, k=0); forprime(p=1, oo, k++; if (n+k < p, break); v *= p^valuation(n+k,p)); return (v)

Formula

For any n >= 0:
- a(n) = Product_{ k > 0 } A000040(k)^A060175(n + k, k) (this product is well defined as only finitely many terms are > 1),
- A007814(a(n)) = A007814(n + 1),
- A007949(a(n)) = A007949(n + 2),
- A112765(a(n)) = A112765(n + 3),
- A214411(a(n)) = A214411(n + 4),
- gcd(n, a(n)) = 1.
For any n > 0:
- a(A073605(n)) is a multiple of A002110(n).

A298161 Nonnegative numbers n such that for any k > 0, n + k is not a multiple of prime(k) (where prime(k) denotes the k-th prime).

Original entry on oeis.org

0, 8, 18, 26, 36, 54, 56, 74, 84, 86, 134, 140, 156, 168, 170, 174, 194, 200, 216, 224, 236, 240, 246, 260, 300, 308, 324, 326, 366, 368, 386, 390, 414, 420, 440, 456, 464, 476, 494, 498, 518, 536, 560, 564, 576, 590, 594, 624, 630, 650, 660, 678, 698, 708
Offset: 1

Views

Author

Rémy Sigrist, Jan 14 2018

Keywords

Comments

Equivalently, these are the numbers n >= 0 such that A298155(n) = 1.
Equivalently, these are the numbers n >= 0 such that the diagonal of A060175 starting at A060175(n+1, 1) contains only zeros.
All terms are even.
This sequence is a subsequence of A005843, A007494, A047207 and A047318.

Crossrefs

Programs

  • Maple
    filter:= proc(n) local p, k;
      p:= 1:
      for k from 1 do
        p:= nextprime(p);
        if p > n+k then return true
        elif n+k mod p = 0 then return false
        fi
      od
    end proc:
    select(filter, [seq(i,i=0..1000,2)]); # Robert Israel, Jan 16 2018

Formula

A007814(a(n) + 1) = 0.
A007949(a(n) + 2) = 0.
A112765(a(n) + 3) = 0.
A214411(a(n) + 4) = 0.

A384003 Irregular triangle T(n,k), n >= 0, 0 <= k < 2^(n-1), where T(n,k) = Product_{j=0..n-1} prime(j+1)^((n-j)*d_j), where d_j is the bit with digit weight 2^j in the binary expansion of 2^(n-1)+k.

Original entry on oeis.org

1, 2, 3, 12, 5, 40, 45, 360, 7, 112, 189, 3024, 175, 2800, 4725, 75600, 11, 352, 891, 28512, 1375, 44000, 111375, 3564000, 539, 17248, 43659, 1397088, 67375, 2156000, 5457375, 174636000, 13, 832, 3159, 202176, 8125, 520000, 1974375, 126360000, 4459, 285376, 1083537
Offset: 0

Views

Author

Michael De Vlieger and Peter Munn, May 28 2025

Keywords

Comments

This sequence can be seen as a structured ordering of numbers m that are not divisible by the square of their greatest prime factor and where every prime in the canonical factorization of m has the same sum of prime index and exponent. For example, prime(1)^3 * prime(3)^1 = 2^3 * 5 = 40. The ordering is lexicographic according to prime divisors listed in decreasing order, as used for A019565. Row n has the numbers whose greatest prime factor is prime(n).

Examples

			Table begins:
n\k  0    1    2     3    4     5     6       7
-----------------------------------------------
0:   1;
1:   2;
2:   3,  12;
3:   5,  40,  45,  360;
4:   7, 112, 189, 3024, 175, 2800, 4725, 75600;
     ...
Table showing prime power decomposition of a(n), where A067255(a(n)) represents prime(i)^j | a(n), with j in the i-th position, replacing 0 with "." for visibility:
 n     a(n)  A067255(a(n))
--------------------------
 0       1   .
 1       2   1
 2       3   .1
 3      12   21
 4       5   ..1
 5      40   3.1
 6      45   .21
 7     360   321
 8       7   ...1
 9     112   4..1
10     189   .3.1
11    3024   43.1
12     175   ..21
13    2800   4.21
14    4725   .321
15   75600   4321
		

Crossrefs

Programs

  • Mathematica
    f[x_] := If[x == 1, {0}, Function[g, ReplacePart[Table[0, {PrimePi[f[[-1, 1]] ]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, g]]@ FactorInteger@ x]; Table[f[Reverse@ Range[Length[#]]*#] &@ Reverse@ IntegerDigits[n, 2], {n, 0, 120}]

Formula

T(0,0) = 1; T(1,0) = 2.
Otherwise, T(n,2k) = A003961(T(n-1,k)).
T(n,2k+1) = T(n,2k)*2^n.
T(n,0) = prime(n).
T(n,2^(n-1)-1) = A006939(n).
T(n,2^(n-2)) = A251720(n).
Using a(m) to denote a term of the linear sequence with offset 0: (Start)
A019565(m) = A007947(a(m)).
a(m) = T(n,k) = gcd(A019565(m)^n, A006939(n)).
Equivalently, for p = A000040(i), the i-th prime, p|a(m) iff p|A019565(m), in which case A060175(m,i) = j - i + 1, where j = PrimePi(gpf(A019565(m))) = A061395(A019565(m)).
(End)
For n > 0, A071178(T(n,k)) = 1.

Extensions

Name edited by Peter Munn, Aug 30 2025
Showing 1-9 of 9 results.