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

A038500 Highest power of 3 dividing n.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 27, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 27, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 81
Offset: 1

Views

Author

Keywords

Comments

To construct the sequence: start with 1 and concatenate twice: 1,1,1 then tripling the last term gives: 1,1,3. Concatenating those 3 terms twice gives: 1,1,3,1,1,3,1,1,3, triple the last term -> 1,1,3,1,1,3,1,1,9. Concatenating those 9 terms twice gives: 1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,9, triple the last term -> 1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,27 etc. - Benoit Cloitre, Dec 17 2002
Also 3-adic value of 1/n, n >= 1. See the Mahler reference, definition on p. 7. This is a non-archimedean valuation. See Mahler, p. 10. Sometimes also called 3-adic absolute value. - Wolfdieter Lang, Jun 28 2014

References

  • Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981.

Crossrefs

Programs

  • Haskell
    a038500 = f 1 where
       f y x = if m == 0 then f (y * 3) x' else y  where (x', m) = divMod x 3
    -- Reinhard Zumkeller, Jul 06 2014
    
  • Magma
    [3^Valuation(n,3): n in [1..100]]; // Vincenzo Librandi, Dec 29 2015
  • Maple
    A038500 := n -> 3^padic[ordp](n,3): # Peter Luschny, Nov 26 2010
  • Mathematica
    Flatten[{1,1,#}&/@(3^IntegerExponent[#,3]&/@(3*Range[40]))] (* or *) hp3[n_]:=If[Divisible[n,3],3^IntegerExponent[n,3],1]; Array[hp3,90] (* Harvey P. Dale, Mar 24 2012 *)
    Table[3^IntegerExponent[n, 3], {n, 100}] (* Vincenzo Librandi, Dec 29 2015 *)
  • PARI
    {a(n) = if( n<1, 0, 3^valuation(n, 3))};
    

Formula

Multiplicative with a(p^e) = p^e if p = 3, 1 otherwise. - Mitch Harris, Apr 19 2005
a(n) = n / A038502(n). Dirichlet g.f. zeta(s)*(3^s-1)/(3^s-3). - R. J. Mathar, Jul 12 2012
From Peter Bala, Feb 21 2019: (Start)
a(n) = gcd(n,3^n).
O.g.f.: x/(1 - x) + 2*Sum_{n >= 1} 3^(n-1)*x^(3^n)/ (1 - x^(3^n)). (End)
Sum_{k=1..n} a(k) ~ (2/(3*log(3)))*n*log(n) + (2/3 + 2*(gamma-1)/(3*log(3)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022

A060904 Largest power of 5 that divides n.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), May 06 2001

Keywords

Comments

Also the largest power of 5 that divides the n-th Fibonacci number A000045(n).
Multiplicative with a(p^e) = 5^e if p = 5, else a(p^e) = 1. - Mitch Harris, Apr 19 2005
Also 5-adic value of 1/n, n >= 1. See the Mahler reference, definition on p. 7. This is a non-archimedean valuation. See Mahler, p. 10. Sometimes also called 5-adic absolute value. - Wolfdieter Lang, Jun 30 2014

Examples

			a(10) = 5 because 10 = 5 * 2.
		

References

  • Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981.

Crossrefs

Programs

Formula

If n is not divisible by 5, then a(n) = 1. If n = 5^k * m where m is not divisible by 5, then a(n) = 5^k.
Dirichlet g.f.: zeta(s)*(5^s-1)/(5^s-5). - R. J. Mathar, Jul 12 2012
a(n) = 5^A112765(n). - Tom Edgar, Mar 22 2014
From Peter Bala, Feb 21 2019: (Start)
a(n) = gcd(n,5^n).
a(n) = n/A132739(n).
O.g.f.: x/(1 - x) + 4*Sum_{n >= 1} 5^(n-1)*x^(5^n)/ (1 - x^(5^n)). (End).
a(n) = (1/5)*(sigma(5*n) - sigma(n))/(sigma(5*n) - 5*sigma(n)), where sigma(n) = A000203(n). - Peter Bala, Jun 10 2022
Sum_{k=1..n} a(k) ~ (4/(5*log(5)))*n*log(n) + (3/5 + 4*(gamma-1)/(5*log(5)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 07 2001
Edited by Joerg Arndt and M. F. Hasler, Dec 29 2015

A268354 Highest power of 7 dividing n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 49, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 49, 1, 1, 1, 1, 1, 1, 7
Offset: 1

Views

Author

Tom Edgar, Feb 02 2016

Keywords

Comments

The generalized binomial coefficients produced by this sequence provide an analog to Kummer's Theorem using arithmetic in base 7.

Examples

			Since 14 = 7 * 2, a(14) = 7. Likewise, since 7 does not divide 13, a(13) = 1.
		

Crossrefs

Programs

  • Magma
    [7^Valuation(n,7): n in [1..150]]; // Vincenzo Librandi, Feb 03 2016
    
  • Mathematica
    7^Table[IntegerExponent[n, 7], {n, 150}] (* Vincenzo Librandi, Feb 03 2016 *)
  • PARI
    a(n) = 7^valuation(n, 7) \\ Michel Marcus, Feb 05 2016
  • Sage
    [7^valuation(i, 7) for i in [1..100]]
    

Formula

a(n) = 7^valuation(n,7).
a(n) = 7^A214411(n).
Completely multiplicative with a(7) = 7, a(p) = 1 for prime p and p <> 7. - Andrew Howroyd, Jul 20 2018
From Peter Bala, Feb 21 2019: (Start)
a(n) = gcd(n,7^n).
a(n) = n/A242603(n).
O.g.f.: x/(1 - x) + 6*Sum_{n >= 1} 7^(n-1)*x^(7^n)/ (1 - x^(7^n)). (End)
Sum_{k=1..n} a(k) ~ (6/(7*log(7)))*n*log(n) + (4/7 + 6*(gamma-1)/(7*log(7)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022
Dirichlet g.f.: zeta(s)*(7^s-1)/(7^s-7). - Amiram Eldar, Jan 03 2023

Extensions

More terms from Antti Karttunen, Dec 22 2017

A305720 Square array T(n, k) read by antidiagonals, n > 0 and k > 0; for any prime number p, the p-adic valuation of T(n, k) is the product of the p-adic valuations of n and of k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 16, 1, 2, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 8, 1, 4, 5, 4, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 9, 64, 1, 6, 1, 64, 9, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 4, 1, 8, 7, 8
Offset: 1

Views

Author

Rémy Sigrist, Jun 09 2018

Keywords

Comments

The array T is completely multiplicative in both parameters.
For any n > 0 and prime number p, T(n, p) is the highest power of p dividing n.
For any function f associating a nonnegative value to any pair of nonnegative values and such that f(0, 0) = 0, we can build an analog of this sequence, say P_f, such that for any prime number p and any n and k > 0 with p-adic valuations i and j, the p-adic valuation of P_f(n, k) equals f(i, j):
f(i, j) P_f
------- ---
i * j T (this sequence)
i + j A003991 (product)
abs(i-j) A089913
min(i, j) A003989 (GCD)
max(i, j) A003990 (LCM)
i AND j A059895
i OR j A059896
i XOR j A059897
If log(N) denotes the set {log(n) : n is in N, the set of the positive integers}, one can define a binary operation on log(N): with prime factorizations n = Product p_i^e_i and k = Product p_i^f_i, set log(n) o log(k) = Sum_{i} (e_i*f_i) * log(p_i). o has the premises of a scalar product even if log(N) isn't a vector space. T(n, k) can be viewed as exp(log(n) o log(k)). - Luc Rousseau, Oct 11 2020

Examples

			Array T(n, k) begins:
  n\k|    1    2    3    4    5    6    7    8    9   10
  ---+--------------------------------------------------
    1|    1    1    1    1    1    1    1    1    1    1
    2|    1    2    1    4    1    2    1    8    1    2  -> A006519
    3|    1    1    3    1    1    3    1    1    9    1  -> A038500
    4|    1    4    1   16    1    4    1   64    1    4
    5|    1    1    1    1    5    1    1    1    1    5  -> A060904
    6|    1    2    3    4    1    6    1    8    9    2  -> A065331
    7|    1    1    1    1    1    1    7    1    1    1  -> A268354
    8|    1    8    1   64    1    8    1  512    1    8
    9|    1    1    9    1    1    9    1    1   81    1
   10|    1    2    1    4    5    2    1    8    1   10  -> A132741
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := With[{p = FactorInteger[GCD[n, k]][[All, 1]]}, If[p == {1}, 1, Times @@ (p^(IntegerExponent[n, p] * IntegerExponent[k, p]))]];
    Table[T[n-k+1, k], {n, 1, 15}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 11 2018 *)
  • PARI
    T(n, k) = my (p=factor(gcd(n, k))[,1]); prod(i=1, #p, p[i]^(valuation(n, p[i]) * valuation(k, p[i])))

Formula

T(n, k) = T(k, n) (T is commutative).
T(m, T(n, k)) = T(T(m, n), k) (T is associative).
T(n, k) = 1 iff gcd(n, k) = 1.
T(n, n) = A054496(n).
T(n, A007947(n)) = n.
T(n, 1) = 1.
T(n, 2) = A006519(n).
T(n, 3) = A038500(n).
T(n, 4) = A006519(n)^2.
T(n, 5) = A060904(n).
T(n, 6) = A065331(n).
T(n, 7) = A268354(n).
T(n, 8) = A006519(n)^3.
T(n, 9) = A038500(n)^2.
T(n, 10) = A132741(n).
T(n, 11) = A268357(n).
Showing 1-4 of 4 results.