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

A001747 2 together with primes multiplied by 2.

Original entry on oeis.org

2, 4, 6, 10, 14, 22, 26, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502
Offset: 1

Views

Author

Keywords

Comments

When supplemented with 8, may be considered the "even primes", since these are the even numbers n = 2k which are divisible just by 1, 2, k and 2k. - Louis Zuckerman (louis(AT)trapezoid.com), Sep 12 2000
Sequence gives solutions of sigma(n) - phi(n) = n + tau(n) where tau(n) is the number of divisors of n.
Numbers n such that sigma(n) = 3*(n - phi(n)).
Except for 2, orders of non-cyclic groups k (in A060679(n)) such that x^k==1 (mod k) has only 1 solution 2<=x<=k. - Benoit Cloitre, May 10 2002
Numbers n such that A092673(n) = 2. - Jon Perry, Mar 02 2004
Except for initial terms, this sequence = A073582 = A074845 = A077017. Starting with the term 10, they are identical. - Robert G. Wilson v, Jun 15 2004
Together with 8 and 16, even numbers n such that n^2 does not divide (n/2)!. - Arkadiusz Wesolowski, Jul 16 2011
Twice noncomposite numbers. - Omar E. Pol, Jan 30 2012

Crossrefs

Equals {2} UNION {A100484}.

Programs

  • GAP
    Concatenation([2], List([1..60], n-> 2*Primes[n])); # G. C. Greubel, May 18 2019
  • Magma
    [2] cat [2*NthPrime(n): n in [1..60]]; // G. C. Greubel, May 18 2019
    
  • Mathematica
    Join[{2},2*Prime[Range[60]]] (* Harvey P. Dale, Jul 23 2013 *)
  • PARI
    print1(2);forprime(p=2,97,print1(", "2*p)) \\ Charles R Greathouse IV, Jan 31 2012
    
  • Sage
    [2]+[2*nth_prime(n) for n in (1..60)] # G. C. Greubel, May 18 2019
    

Formula

a(n) = A001043(n) - A001223(n+1), except for initial term.
a(n) = A116366(n-2,n-2) for n>2. - Reinhard Zumkeller, Feb 06 2006
A006093(n) = A143201(a(n+1)) for n>1. - Reinhard Zumkeller, Aug 12 2008
a(n) = 2*A008578(n). - Omar E. Pol, Jan 30 2012, and Reinhard Zumkeller, Feb 16 2012

A011776 a(1) = 1; for n > 1, a(n) is defined by the property that n^a(n) divides n! but n^(a(n)+1) does not.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 5, 1, 2, 3, 3, 1, 4, 1, 4, 3, 2, 1, 7, 3, 2, 4, 4, 1, 7, 1, 6, 3, 2, 5, 8, 1, 2, 3, 9, 1, 6, 1, 4, 10, 2, 1, 11, 4, 6, 3, 4, 1, 8, 5, 9, 3, 2, 1, 14, 1, 2, 10, 10, 5, 6, 1, 4, 3, 11, 1, 17, 1, 2, 9, 4, 7, 6, 1, 19, 10, 2, 1, 13, 5, 2, 3, 8, 1, 21
Offset: 1

Views

Author

Keywords

Comments

From Stefano Spezia, Nov 08 2018: (Start)
It appears that for n > 1 a(n) = 1 iff n = 4 or a prime number (see A175787).
It appears that a(n) = 2 iff n is in A074845. (End)
Since a prime p is coprime to all positive integers less than p, a(p)=1. - Robert D. Rosales, Jun 17 2024
If n > 4 is composite then a(n) > 1. Proof: 1) If n is not a square of a prime, then n has a divisor d such that 1 < d < n/d < n, so d, n/d and n appear as different factors in n!, n^2 | n!, and therefore a(n) >= 2. 2) If n = p^2 is a square of a prime, then p, 2*p and p^2 appear as different factors in n! when p > 2, therefore a(n) >= 2 if n != 4. - Amiram Eldar, Jul 06 2024

Examples

			12^5 divides 12! but 12^6 does not so a(12) = 5.
		

References

  • Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 251.

Crossrefs

Diagonal of A090622.
Cf. A175787 (primes together with 4).

Programs

  • Haskell
    a011776 1 = 1
    a011776 n = length $
       takeWhile ((== 0) . (mod (a000142 n))) $ iterate (* n) n
    -- Reinhard Zumkeller, Sep 01 2012
    
  • Maple
    a := []; for n from 2 to 200 do i := 0: while n! mod n^i = 0 do i := i+1: od: a := [op(a),i-1]; od: a;
    # second Maple program:
    f:= proc(n, p) local c, k; c, k:= 0, p;
           while n>=k do c:= c+iquo(n, k); k:= k*p od; c
        end:
    a:= n-> min(seq(iquo(f(n, i[1]), i[2]), i=ifactors(n)[2])): a(1):=1:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 04 2012
  • Mathematica
    Do[m = 1; While[ IntegerQ[ n!/n^m], m++ ]; Print[m - 1], {n, 1, 100} ]
    HighestPower[n_,p_] := Module[{r,s=0,k=1}, While[r=Floor[n/p^k]; r>0, s=s+r; k++ ];s]; SetAttributes[HighestPower,Listable]; Join[{1}, Table[{p,e}=Transpose[FactorInteger[n]]; Min[Floor[HighestPower[n,p]/e]], {n,2,100}]] (* T. D. Noe, Oct 01 2008 *)
    Join[{1},Table[IntegerExponent[n!,n],{n,2,500}]] (* Vladimir Joseph Stephan Orlovsky, Dec 26 2010 *)
    f[n_, p_] := Module[{c=0, k=p}, While[n >= k , c = c + Quotient[n, k]; k = k*p ]; c]; a[1]=1; a[n_] := Min[ Table[ Quotient[f[n, i[[1]]], i[[2]]], {i, FactorInteger[n] }]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 03 2013, after Alois P. Heinz's Maple program *)
  • PARI
    a(n)=if(n>1, valuation(n!,n), 1); \\ Charles R Greathouse IV, Apr 10 2014
    
  • PARI
    vp(n,p)=my(s); while(n\=p, s+=n); s
    a(n)=if(n==1,return(1)); my(f=factor(n)); vecmin(vector(#f~, i, vp(n,f[i,1])\f[i,2])) \\ Charles R Greathouse IV, Apr 10 2014

A215454 a(n) = least positive k such that n^2 divides k!

Original entry on oeis.org

1, 4, 6, 6, 10, 6, 14, 8, 9, 10, 22, 6, 26, 14, 10, 10, 34, 9, 38, 10, 14, 22, 46, 8, 20, 26, 15, 14, 58, 10, 62, 12, 22, 34, 14, 9, 74, 38, 26, 10, 82, 14, 86, 22, 10, 46, 94, 10, 28, 20, 34, 26, 106, 15, 22, 14, 38, 58, 118, 10, 122, 62, 14, 16, 26, 22, 134, 34
Offset: 1

Views

Author

Alex Ratushnyak, Aug 11 2012

Keywords

Comments

Indices n such that a(n)=n: 1 followed by A074845.

Examples

			a(12): least positive k such that 144 divides k! is k=6, 6!=720. So a(12)=6.
		

Crossrefs

Cf. A002034 (least k such that n divides k!).
Cf. A085779 (least k such that triangular(n) divides k!).
Cf. A093896 (least positive k such that n^n divides k!).

Programs

  • Mathematica
    Module[{nn=200,f},f=Range[nn]!;Position[f,#]&/@Table[SelectFirst[ f, Divisible[ #,n^2]&],{n,nn}]]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 11 2018 *)
  • Python
    TOP = 77
    ii = [0]*TOP
    for i in range(1, TOP):
        ii[i] = i*i
    f = k = y = 1
    res = [-1]*TOP
    while y
    				
Showing 1-3 of 3 results.