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

A286561 Square array A(n,k): A(n,1) = 1, and for k > 1, A(n,k) = the highest exponent e such that k^e divides n, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 20 2017

Keywords

Examples

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

Crossrefs

Cf. A286562 (transpose), A286563 (lower triangular region), A286564 (lower triangular region reversed).
Cf. A169594 (row sums), also A168512, A178638, A186643.
Cf. also array A286156.

Programs

  • Mathematica
    Table[Function[m, If[k == 1, 1, IntegerExponent[m, k]]][n - k + 1], {n, 15}, {k, n}] // TableForm (* Michael De Vlieger, May 20 2017 *)
  • PARI
    A286561(n,k) = if(1==k, 1, valuation(n, k)); \\ Antti Karttunen, May 27 2017
    
  • Python
    def a(n, k):
        i=1
        if k==1: return 1
        while n%(k**i)==0:
            i+=1
        return i-1
    for n in range(1, 21): print([a(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286561 n) (A286561bi (A002260 n) (A004736 n)))
    (define (A286561bi row col) (if (= 1 col) 1 (let loop ((i 1)) (if (not (zero? (modulo row (expt col i)))) (- i 1) (loop (+ 1 i))))))
    

A178638 a(n) is the number of divisors d of n such that d^k is not equal to n for any k >= 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 2, 1, 3, 1, 5, 1, 3, 3, 2, 1, 5, 1, 5, 3, 3, 1, 7, 1, 3, 2, 5, 1, 7, 1, 4, 3, 3, 3, 7, 1, 3, 3, 7, 1, 7, 1, 5, 5, 3, 1, 9, 1, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 11, 1, 3, 5, 3, 3, 7, 1, 5, 3, 7, 1, 11, 1, 3, 5, 5, 3, 7, 1, 9, 2, 3, 1, 11, 3, 3, 3, 7, 1, 11, 3, 5, 3, 3, 3, 11, 1, 5, 5, 7
Offset: 1

Views

Author

Jaroslav Krizek, Dec 25 2010

Keywords

Examples

			For n = 16, set of such divisors is {1, 8}; a(16) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, 1 &, If[# > 1, #^IntegerExponent[n, #], 1] != n &], {n, 100}] (* Michael De Vlieger, May 27 2017 *)
  • PARI
    A286561(n,k) = if(1==k, 1, valuation(n, k));
    A178638(n) = sumdiv(n,d,if((d^A286561(n,d))<>n,1,0)); \\ Antti Karttunen, May 26 - 27 2017
    
  • PARI
    a(n) = if(n==1, return(0)); my(f=factor(n), g = f[1, 2]); for(i=2, matsize(f)[1], g=gcd(g, f[i, 2])); numdiv(n) - numdiv(g) \\ David A. Corneth, May 27 2017

Formula

a(n) = A000005(n) - A089723(n).
a(1) = 0, a(p) = 1, a(pq) = 3, a(pq...z) = 2^k-1, a(p^k) = k+1-A000005(k), for p, q = primes, k = natural numbers, pq...z = product of k (k > 2) distinct primes p, q, ..., z.

A050294 Maximum cardinality of a 3-fold-free subset of {1, 2, ..., n}.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 9, 9, 10, 11, 11, 12, 13, 14, 15, 16, 16, 17, 18, 18, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 27, 28, 29, 29, 30, 31, 31, 32, 33, 34, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 44, 44, 45, 46, 47, 48, 49, 49, 50, 51, 51, 52, 53, 54, 55
Offset: 1

Views

Author

Keywords

Comments

For a given r>1, a set is r-fold-free if it does not contain any subset of the form {x, r*x}.
If r is in A050376, then an r-fold-free set with the highest cardinality is obtained by removing from {1,...,n} all numbers for which r is an infinitary divisor (for the definition of the infinitary divisor of n, see comment to A037445). In general, an r-fold-free set with the highest cardinality is obtained by removing from {1,...,n} all numbers for which r is an oex divisor (for the definition of the oex divisor of n, see A186643). - Vladimir Shevelev Feb 22 2011 and Feb 28 2011.
Equals A051068 shifted by 1. - Michel Dekking, Feb 18 2019

Examples

			a(26)=26-a(floor(26/3))=26-a(8)=26-6=20.
		

Crossrefs

Programs

  • PARI
    a(n)=if(n==0,0,n-a(floor(n/3))); \\ Joerg Arndt, Apr 27 2013

Formula

Take r = 3 in a(n) = (r n + sum [k = 0 to m] (-1)^k b(k)) / (r + 1), where [b(m) b(m-1) ... b(0)] is the base-r representation of n. - Rob Pratt, Apr 21 2004
Take r=3 in a(n) = n-a(floor(n/r)); a(n)=n-floor(n/r)+floor(n/r^2)-floor(n/r^3)+... [Vladimir Shevelev, Feb 22 2011].

Extensions

More terms from John W. Layman, Oct 25 2002
Corrected and edited by Steven Finch, Feb 25 2009

A186644 The sum of the oex divisors of n.

Original entry on oeis.org

1, 3, 4, 5, 6, 12, 8, 15, 10, 18, 12, 26, 14, 24, 24, 25, 18, 36, 20, 40, 32, 36, 24, 60, 26, 42, 40, 54, 30, 72, 32, 59, 48, 54, 48, 80, 38, 60, 56, 90, 42, 96, 44, 82, 75, 72, 48, 118, 50, 88, 72, 96, 54, 120, 72, 120, 80, 90, 60, 166, 62, 96, 101, 117, 84, 144, 68, 124, 96, 144, 72, 186, 74, 114, 119, 138, 96
Offset: 1

Views

Author

Vladimir Shevelev, Feb 25 2011

Keywords

Comments

See A186643 for a definition of which divisors of n are classified as oex divisors.

Crossrefs

Programs

  • Maple
    maxval := proc(n,d) local nshf,a ; if n mod d <> 0 then 0; else nshf := n ; a := 0 ; while nshf mod d = 0 do nshf := nshf /d ; a := a+1 ; end do: a; end if; end proc:
    A186644 := proc(n) a := 1 ; for d in numtheory[divisors](n) minus {1} do if type(maxval(n,d),'odd') then a := a+d ; end if; end do: a ; end proc: # R. J. Mathar, Mar 04 2011
  • Mathematica
    Table[DivisorSum[n, # &, Or[# == 1, OddQ@ IntegerExponent[n, #]] &], {n, 77}] (* Michael De Vlieger, Nov 23 2017 *)
  • PARI
    a(n) = sumdiv(n, d, d*((d==1) || (valuation(n, d) % 2))); \\ Michel Marcus, Feb 06 2016

Formula

a(n) >= A049417(n).

Extensions

More terms from Antti Karttunen, Nov 23 2017

A186970 The oex analog of the Euler phi-function for the oex prime power factorization of positive integers.

Original entry on oeis.org

1, 1, 2, 3, 4, 3, 6, 4, 8, 5, 10, 7, 12, 8, 9, 12, 16, 11, 18, 12, 14, 14, 22, 9, 24, 16, 18, 18, 28, 13, 30, 16, 22, 21, 25, 24, 36, 24, 27, 17, 40, 17, 42, 30, 33, 29, 46, 27, 48, 32, 36, 36, 52, 24, 42, 25, 40, 37, 58, 28, 60, 40, 49, 48, 50, 30, 66, 48, 49, 35, 70, 32, 72, 48, 54, 54, 61, 36
Offset: 1

Views

Author

Vladimir Shevelev, Mar 01 2011

Keywords

Comments

Oex divisors d of an integer n are defined in A186443: those divisors d which are either 1 or numbers such that d^k || n (the highest power of d dividing n) has odd exponent k.
A positive number is called an oex prime if it has only two oex divisors; since every n >= 2 has at least two oex divisors, 1 and n, an oex prime q has only oex divisors 1 and q. A000430 is the sequence of oex primes q, i.e., A186643(q) = 2 iff q is an entry in A000430.
A unique factorization, called an oex prime power factorization, of integers n is introduced as follows: each factor p^e in the conventional prime power factorization n = Product(p^e) is written as (p^2)^(e/2) if e is even, and as (p^2)^floor(e/2)*p if e is odd. This represents n as a product of oex primes of the type q=p^2, with unconstrained exponents e/2, and of oex primes of the type q=p with exponents 0 or 1. (This is similar to splitting n into its squarefree part A007913(n) times A008833(n), followed by an ordinary prime factorization in both parts separately.)
Let n = q_1^a_1*q_2^a_2*... and m = q_1^b_1*q_2^b_2*..., a_i,b_i >= 0 be the oex prime power factorizations of n and m. Define the oex GCD of n and m as [n,m] = q_1^min(a_1,b_1) * q_2^min(a_2,b_2) * .... Then a(n) = Sum_{m=1..n, [m,n]=1} 1, the oex analog of the Euler-phi function.

Examples

			The oex prime power factorization of 16 is 4^2. Since [16,i]=1 for i=1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, and 15, a(16)=12.
The oex prime power factorization of 9 is 9. Thus a(9)=8.
		

Crossrefs

Programs

  • Maple
    highpp := proc(n,d) local nshf,a ; if n mod d <> 0 then 0; else nshf := n ; a := 0 ; while nshf mod d = 0 do nshf := nshf /d ; a := a+1 ; end do: a; end if; end proc:
    oexgcd := proc(n,m) local a,p,kn,km ; a := 1 ; for p in numtheory[factorset](n) do kn := highpp(n,p) ; km := highpp(m,p) ; if type(kn,'even') = type(km,'even') then ; else kn := 2*floor(kn/2) ; km := 2*floor(km/2) ; end if; a := a*p^min(kn,km) ; end do: a ; end proc:
    A186970 := proc(n) local a,i; a := 0 ; for i from 1 to n do if oexgcd(n,i) = 1 then a := a+1 ; end if; end do: a; end proc:
    seq(A186970(n),n=1..80) ; # R. J. Mathar, Mar 18 2011

Formula

Let core(n) = p_1*...*p_r = A007913(n), n/core(n) = A008833(n) = q_1^c_1*...*q_t^c_t, where q_i are squares of primes.
If core(n)=1, then a(n) = n*Product_{j=1..r} (1-1/q_i); if core(n) tends to infinity, then a(n) ~ n * core(n) * Product_{i=1..t} (1-1/q_i) / Product_{j=1..r} (1+p_j).
a(n) <= A064380(n).

A186889 Oex perfect numbers: n such that A186644(n) = 2*n.

Original entry on oeis.org

6, 18, 20, 100, 1888, 2044928, 33099776, 35021696, 45335936, 533020672
Offset: 1

Views

Author

Vladimir Shevelev, Feb 28 2011

Keywords

Comments

There are no squarefree infinitary perfect numbers > 6 (cf. A007357). Therefore, the second and all further terms of the sequence are infinitary deficient (A129657).
No further term between 1888 and 1440000. - R. J. Mathar, Mar 18 2011
a(11) > 3*10^10. 1471763808896 is also a term. - Donovan Johnson, Jan 30 2013

Examples

			Let n = 100 with divisors 1, 2, 4, 5, 10, 20, 25, 50, and 100. By the definition in A186643, only 1, 4, 20, 25, 50, 100 among these are oex divisors. Since 1+4+20+25+50+100 = 2*100, 100 is in the sequence.
		

Crossrefs

Programs

  • PARI
    for(n=4, 10^9, if(isprime(n), next); d=divisors(n); s=n+1; for(j=2, numdiv(n)-1, for(k=2, 30, if(n%d[j]^k<>0, if(k%2==0, s=s+d[j]); k=30))); if(s==2*n, print(n))) /* Donovan Johnson, Jan 28 2013 */

Extensions

a(6)-a(10) from Donovan Johnson, Jan 28 2013
Showing 1-6 of 6 results.