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-10 of 63 results. Next

A280269 Irregular triangle T(n,m) read by rows: smallest power e of n that is divisible by m = term k in row n of A162306.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Dec 30 2016

Keywords

Comments

This table eliminates the negative values in row n of A279907.
Let k = A162306(n,m), i.e., the value in column m of row n.
T(n,1) = 0 since 1 | n^0.
T(n,p) = 1 for prime divisors p of n since p | n^1.
T(n,d) = 1 for divisors d > 1 of n since d | n^1.
Row n for prime p have two terms, {0,1}, the maximum value 1, since all k < p are coprime to p, and k | p^1 only when k = p.
Row n for prime power p^i have (i+1) terms, one zero and i ones, since all k that appear in corresponding row n of A162306 are divisors d of p^i.
Values greater than 1 pertain only to composite k of composite n > 4, but not in all cases. T(n,k) = 1 for squarefree kernels k of composite n.
Numbers k > 1 coprime to n and numbers that are products of at least one prime q coprime to n and one prime p | n do not appear in A162306; these do not divide n^e evenly.
T(n,k) is nonnegative for all numbers k for which n^k (mod k) = 0, i.e., all the prime divisors p of k also divide n.
The largest possible value s in row n of T = floor(log_2(n)), since the largest possible multiplicity of any number m <= n pertains to perfect powers of 2, as 2 is the smallest prime. This number s first appears at T(2^s + 2, 2^s) for s > 1.
1/k terminates T(n,k) digits after the radix point in base n for values of k that appear in row n of A162306.
Originally from Robert Israel at A279907: (Start)
T(a*b,c*d) = max(T(a,c),T(b,d)) if GCD(a,b)=1, GCD(b,d)=1,T(a,c)>=0 and T(b,d)>=0.
T(n,a*b) = max(T(n,a),T(n,b)) if GCD(a,b)=1 and T(n,a)>=0 and T(n,b)>=0.
(End)

Examples

			Triangle T(n,m) begins:  Triangle A162306(n,k):
1:  0                    1
2:  0  1                 1  2
3:  0  1                 1  3
4:  0  1  1              1  2  4
5:  0  1                 1  5
6:  0  1  1  2  1        1  2  3  4  6
7:  0  1                 1  7
8:  0  1  1  1           1  2  4  8
9:  0  1  1              1  3  9
10: 0  1  2  1  3  1     1  2  4  5  8  10
...
		

Crossrefs

Cf. A162306, A279907 (T(n,k) with values for all 1 <= k <= n), A280274 (maximum values in row n), A010846 (number of nonnegative k in row n), A051731 (k with e <= 1), A000005 (number of k in row n with e <= 1), A272618 (k with e > 1), A243822 (number of k in row n with e > 1), A007947.

Programs

  • Mathematica
    Table[SelectFirst[Range[0, #], PowerMod[n, #, k] == 0 &] /. m_ /; MissingQ@ m -> Nothing &@ Floor@ Log2@ n, {n, 24}, {k, n}] // Flatten (* Version 10.2, or *)
    DeleteCases[#, -1] & /@ Table[If[# == {}, -1, First@ #] &@ Select[Range[0, #], PowerMod[n, #, k] == 0 &] &@ Floor@ Log2@ n, {n, 24}, {k, n}] // Flatten (* or *)
    DeleteCases[#, -1] & /@ Table[Boole[k == 1] + (Boole[#[[-1, 1]] == 1] (-1 + Length@ #) /. 0 -> -1) &@ NestWhileList[Function[s, {#1/s, s}]@ GCD[#1, #2] & @@ # &, {k, n}, And[First@# != 1, ! CoprimeQ @@ #] &], {n, 24}, {k, n}] // Flatten

A372323 A124652(n) is the a(n)-th term in row A372111(n-1) of irregular triangle A162306.

Original entry on oeis.org

2, 4, 4, 4, 5, 7, 5, 8, 8, 2, 10, 8, 12, 11, 13, 6, 13, 6, 6, 9, 8, 11, 4, 8, 16, 5, 6, 7, 13, 12, 7, 10, 19, 15, 16, 17, 9, 6, 15, 10, 3, 11, 8, 18, 28, 14, 14, 10, 30, 28, 15, 4, 20, 33, 13, 12, 6, 22, 18, 21, 12, 11, 29, 12, 11, 8, 24, 18, 8, 14, 17, 32, 33
Offset: 3

Views

Author

Michael De Vlieger, May 05 2024

Keywords

Comments

Let b(x) = A124652(x) and let s(x) = A372111(x), where A372111 contains partial sums of A124652.
Let r(x) = A010846(x), the number of m <= x such that rad(m) | x, where rad = A007947.
Let row k of A162306 contain { m : rad(m) | k, m <= k }. Thus r(k) is the length of row k of A162306.
Let T(k,j) represent the j-th term in row k of irregular triangle A162306.
a(n) = j is the position of b(n) in row s(n-1) of A162306.
b(n) = T(s(n-1), a(n)).
Analogous to A371910, which instead regards A109890 and A109735.

Examples

			Let b(x) = A124652(x) and let s(x) = A372111(x), where A372111 contains partial sums of A124652.
a(3) = 2 since b(3) = 3 is the 2nd term in row s(3) = 3 of A162306, {1, [3]}.
a(4) = 4 since b(4) = 4 is the 4th term in row s(4) = 6 of A162306, {1, 2, 3, [4], 6}.
a(5) = 4 since b(5) = 5 is T(s(n-1), 4) = T(10, 4), {1, 2, 4, [5], 8, 10}.
a(6) = 4 since b(6) = 9 is T(s(n-1), 4) = T(15, 4), {1, 3, 5, [9], 15}.
a(7) = 5 since b(7) = 6 is T(s(n-1), 5) = T(24, 5), {1, 2, 3, 4, [6], 8, 9, 12, 16, 18, 24}, etc.
Table relating this sequence to b = A124652, s = A372111, r = A372322, and A162306.
   n b(n) s(n-1) a(n) r(n) row s(n-1) of A162306
  ---------------------------------------------------------------------
   3    3    3    2    2   {1, [3]}
   4    4    6    4    5   {1, 2, 3, [4], 6}
   5    5   10    4    6   {1, 2, 4, [5], 8, 10}
   6    9   15    4    5   {1, 3, 5, [9], 15}
   7    6   24    5   11   {1, 2, 3, 4, [6], ..., 24}
   8    8   30    7   18   {1, 2, 3, 4, 5, 6, [8], ..., 30}
   9   16   38    5    8   {1, 2, 4, 8, [16], 19, 32, 38}
  10   12   54    8   16   {1, 2, 3, 4, 6, 8, 9, [12], ..., 54}
  11   11   66    8   22   {1, 2, 3, 4, 6, 8, 9, [11], ..., 66}
  12    7   77    2    5   {1, [7], 11, 49, 77}
  13   14   84   10   28   {1, 2, 3, 4, ..., 12, [14], ..., 84}
  14   28   98    8   13   {1, 2, 4, 7, ..., 16, [28], ..., 98}
		

Crossrefs

Programs

  • Mathematica
    nn = 75; c[_] := False;
    rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]];
    f[x_] := Select[Range[x], Divisible[x, rad[#]] &];
    Array[Set[{a[#], c[#]}, {#, True}] &, 2]; s = a[1] + a[2];
    Reap[Do[r = f[s]; k = SelectFirst[r, ! c[#] &];
      Sow[FirstPosition[r, k][[1]]]; c[k] = True;
      s += k, {i, 3, nn}] ][[-1, 1]]

A382926 Irregular table where row n lists numbers k in row n of A162306 for which there exists a prime p | n such that k*p > n.

Original entry on oeis.org

2, 3, 4, 5, 3, 4, 6, 7, 8, 9, 4, 5, 8, 10, 11, 6, 8, 9, 12, 13, 4, 7, 8, 14, 5, 9, 15, 16, 17, 8, 9, 12, 16, 18, 19, 5, 8, 10, 16, 20, 7, 9, 21, 4, 8, 11, 16, 22, 23, 9, 12, 16, 18, 24, 25, 4, 8, 13, 16, 26, 27, 7, 8, 14, 16, 28, 29, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30
Offset: 2

Views

Author

Michael De Vlieger, Apr 28 2025

Keywords

Comments

The number n appears in each row. For n in A024619, for all p|n, p^floor(log_p n) is in row n. Thus, the number of terms in row n for n in A024619 is at least 1+omega(n), where omega = A001221 is the number of distinct prime factors of n.

Examples

			Let s(n) = A382964(n).
Table of select rows:
 n  s(n)    row n of this sequence
--------------------------------------------------------
 6    3     3,  4,  6;
10    4     4,  5,  8, 10;
12    4     6,  8,  9, 12;
14    4     4,  7,  8, 14;
15    3     5,  9, 15;
18    5     8,  9, 12, 16, 18;
20    5     5,  8, 10, 16, 20;
21    3     7,  9, 21;
22    5     4,  8, 11, 16, 22;
24    5     9, 12, 16, 18, 24;
26    5     4,  8, 13, 16, 26;
28    5     7,  8, 14, 16, 28;
30   12     8,  9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30.
In the examples below, we place terms in row n in brackets [] among other terms in row n of A162306, presented in order of row n of A275280.
Row p^m for m > 0 and prime p is {p^m}, since multiplying p^m by p exceeds p^m.
Row 10 = {4, 5, 8, 10}, since numbers k such that rad(k) | 10 contains these numbers, furthermore, we have the following: 2 or 5 times 8 exceeds 10, 5*4 > 10, 2 or 5 times 10 exceeds 10, and 5*5 > 10.
      1    2   [4]  [8]
     [5] [10]
Row 24 = {9, 12, 16, 18, 24}, since numbers k such that rad(k) | 24 contains these numbers, furthermore, we have the following: 2 or 3 times 16 exceeds 24, 2 or 3 times 24 exceeds 24, 3*12 > 24, 2 or 3 times 18 exceeds 24, and 3*9 > 24.
      1    2    4    8  [16]
      3    6  [12] [24]
     [9] [18]
		

Crossrefs

Cf. A000961, A007947, A024619, A162306, A275280, A382964 (row lengths).

Programs

  • Mathematica
    (* First, run the "regs" function from A369609, then: *)
    Table[Select[regs[n], Function[k, AnyTrue[FactorInteger[n][[All, 1]], #*k > n &]]], {n, 2, 30}] // Flatten

Formula

For n in A000961, row n is {n}.

A010846 Number of numbers <= n whose set of prime factors is a subset of the set of prime factors of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 4, 3, 6, 2, 8, 2, 6, 5, 5, 2, 10, 2, 8, 5, 7, 2, 11, 3, 7, 4, 8, 2, 18, 2, 6, 6, 8, 5, 14, 2, 8, 6, 11, 2, 19, 2, 9, 8, 8, 2, 15, 3, 12, 6, 9, 2, 16, 5, 11, 6, 8, 2, 26, 2, 8, 8, 7, 5, 22, 2, 10, 6, 20, 2, 18, 2, 9, 9, 10, 5, 23, 2, 14, 5, 9, 2, 28, 5, 9, 7, 11, 2, 32, 5, 10
Offset: 1

Views

Author

Keywords

Comments

This function of n appears in an ABC-conjecture by Andrew Granville. See Goldfeld. - T. D. Noe, Jun 30 2009

Examples

			From _Wolfdieter Lang_, Jun 30 2014: (Start)
a(1) = 1 because the empty set is a subset of any set.
a(6) = 5 from the five numbers: 1 with the empty set, 2 with the set {2}, 3 with {3}, 4 with {2} and 6 with {2,3}, which are all subsets of {2,3}. 5 is out because {5} is not a subset of {2,3}. (End)
From _David A. Corneth_, Feb 10 2015: (Start)
Let p# be the product of primes up to p, A002110. Then,
a(13#) = 1161
a(17#) = 4843
a(19#) = 19985
a(23#) = 83074
a(29#) = 349670
a(31#) = 1456458
a(37#) = 6107257
a(41#) = 25547835
(End)
		

Crossrefs

Cf. A162306 (numbers for each n).

Programs

  • Maple
    A:= proc(n) local F, S, s,j,p;
      F:= numtheory:-factorset(n);
      S:= {1};
      for p in F do
        S:= {seq(seq(s*p^j, j=0..floor(log[p](n/s))),s=S)}
      od;
      nops(S)
    end proc;
    seq(A(n),n=1..1000); # Robert Israel, Jun 27 2014
  • Mathematica
    pf[n_] := If[n==1, {}, Transpose[FactorInteger[n]][[1]]]; SubsetQ[lst1_, lst2_] := Intersection[lst1,lst2]==lst1; Table[pfn=pf[n]; Length[Select[Range[n], SubsetQ[pf[ # ],pfn] &]], {n,100}] (* T. D. Noe, Jun 30 2009 *)
    Table[Total[MoebiusMu[#] Floor[n/#] &@ Select[Range@ n, CoprimeQ[#, n] &]], {n, 92}] (* Michael De Vlieger, May 08 2016 *)
  • PARI
    a(n,f=factor(n)[,1])=if(#f>1,my(v=f[1..#f-1],p=f[#f],s); while(n>0, s+=a(n,v); n\=p); s, if(#f&&n>0,log(n+.5)\log(f[1])+1,n>0)) \\ Charles R Greathouse IV, Jun 27 2013
    
  • PARI
    a(n) = sum(k=1,n,if(gcd(n,k)-1,0,moebius(k)*(n\k))) \\ Benoit Cloitre, May 07 2016
    
  • PARI
    a(n,f=factor(n)[,1])=if(#f<2, return(if(#f, valuation(n,f[1])+1, 0))); my(v=f[1..#f-1],p=f[#f],s); while(n, s+=a(n,v); n\=p); s \\ Charles R Greathouse IV, Nov 03 2021
    
  • Python
    def A010846(n): return sum((m:=n**k)//k-(m-1)//k for k in range(1,n+1)) # Chai Wah Wu, Aug 15 2024
    
  • Python
    from math import gcd
    from sympy import mobius
    def A010846(n): return sum(mobius(k)*(n//k) for k in range(1,n+1) if gcd(n,k)==1) # Chai Wah Wu, Apr 23 2025

Formula

a(n) = |{k<=n, k|n^(tau(k)-1)}|. - Vladeta Jovovic, Sep 13 2006
a(n) = Sum_{j = 1..n} Product_{primes p | j} delta(n mod p,0) where delta is the Kronecker delta. - Robert Israel, Feb 09 2015
a(n) = Sum_{1<=k<=n,(n,k)=1} mu(k)*floor(n/k). - Benoit Cloitre, May 07 2016
a(n) = Sum_{k=1..n} floor(n^k/k)-floor((n^k -1)/k). - Anthony Browne, May 28 2016

Extensions

Definition made more precise at the suggestion of Wolfdieter Lang

A243822 Number of k < n such that rad(k) | n but k does not divide n, where rad = A007947.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 2, 0, 2, 1, 0, 0, 4, 0, 2, 1, 3, 0, 3, 0, 3, 0, 2, 0, 10, 0, 0, 2, 4, 1, 5, 0, 4, 2, 3, 0, 11, 0, 3, 2, 4, 0, 5, 0, 6, 2, 3, 0, 8, 1, 3, 2, 4, 0, 14, 0, 4, 2, 0, 1, 14, 0, 4, 2, 12, 0, 6, 0, 5, 3, 4, 1, 15, 0, 4, 0, 5, 0, 16, 1, 5, 3, 3, 0, 20, 1, 4, 3, 5, 1, 8, 0, 7, 2, 6
Offset: 1

Views

Author

Michael De Vlieger, Jun 11 2014

Keywords

Comments

Former name: number of "semidivisors" of n, numbers m < n that do not divide n but divide n^e for some integer e > 1. See ACM Inroads paper.

Examples

			From _Michael De Vlieger_, Aug 11 2024: (Start)
Let S(n) = row n of A162306 and let D(n) = row n of A027750.a(2) = 0 since S(2) \ D(2) = {1, 2} \ {1, 2} is null.
a(10) = 2 since S(10) \ D(10) = {1, 2, 4, 5, 8, 10} \ {1, 2, 5, 10} = {4, 8}.a(16) = 0 since S(16) \ D(16) = {1, 2, 4, 8, 16} \ {1, 2, 4, 8, 16} is null, etc.Table of a(n) and S(n) \ D(n):
   n  a(n)  row n of A272618.
  ---------------------------
   6    1   {4}
  10    2   {4, 8}
  12    2   {8, 9}
  14    2   {4, 8}
  15    1   {9}
  18    4   {4, 8, 12*, 16}
  20    2   {8, 16}
  21    1   {9}
  22    3   {4, 8, 16}
  24    3   {9, 16, 18*}
  26    3   {4, 8, 16}
  28    2   {8, 16}
  30   10   {4, 8, 9, 12, 16, 18, 20, 24, 25, 27}
Terms in A272618 marked with an asterisk are counted by A355432. All other terms are counted by A361235. (End)
		

Crossrefs

Programs

Formula

a(n) = A010846(n) - A000005(n) = card({row n of A162306} \ {row n of A027750}).
a(n) = A045763(n) - A243823(n).
a(n) = (Sum_{1<=k<=n, gcd(n,k)=1} mu(k)*floor(n/k)) - tau(n). - Michael De Vlieger, May 10 2016, after Benoit Cloitre at A010846.
From Michael De Vlieger, Aug 11 2024" (Start)
a(n) = 0 for n in A000961, a(n) > 0 for n in A024619.
a(n) = A051953(n) - A000005(n) + 1 = n - A000010(n) - A000005(n) - A243823(n) + 1.
a(n) = A355432(n) + A361235(n).
a(n) = A355432(n) for n in A360768.
a(n) = A361235(n) for n not in A360768.
a(n) = number of terms in row n of A272618.
a(n) = sum of row n of A304570. (End)

Extensions

New name from David James Sycamore, Aug 11 2024

A272618 Irregular array read by rows: n-th row contains (in ascending order) the nondivisors 1 <= k < n such that all the prime divisors p of k also divide n.

Original entry on oeis.org

0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 8, 0, 8, 9, 0, 4, 8, 9, 0, 0, 4, 8, 12, 16, 0, 8, 16, 9, 4, 8, 16, 0, 9, 16, 18, 0, 4, 8, 16, 0, 8, 16, 0, 4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 0, 0, 9, 27, 4, 8, 16, 32, 25, 8, 16, 24, 27, 32, 0, 4, 8, 16, 32, 9, 27, 16, 25, 32, 0, 4, 8, 9, 12, 16, 18, 24, 27, 28, 32
Offset: 1

Views

Author

Michael De Vlieger, May 03 2016

Keywords

Comments

The k are the "semidivisors" or nondivisor regular numbers of n as counted by A243822(n).
All nonzero terms k are composite and pertain to composite rows n. This is because prime k must either divide or be coprime to n, and k = 1 is both a divisor of and coprime to n.
Row n for prime p contains zero, since numbers 1 <= k < p must either divide or be coprime to prime p.
Row n for prime powers p^e contains zero, since there is only one prime divisor p of p^e and every power 1 <= m <= e of p divides p^e.
Row n = 4 is a special case of composite n that contains zero. This is because 4 is the smallest composite number; there are no composites k < n.
Thus rows n for composite n > 4 contain at least 1 nonzero value.
In base n, 1/a(n) has a terminating expansion with at least 2 places.

Examples

			For n = 12, the numbers 1 <= k < n such that the prime divisors p of k also divide n are {2, 3, 4, 6, 8, 9}; {2, 3, 4, 6} divide n = 12, thus row n = 12 is {8, 9}.
n: k
1: 0
2: 0
3: 0
4: 0
5: 0
6: 4
7: 0
8: 0
9: 0
10: 4 8
11: 0
12: 8 9
13: 0
14: 4 8
15: 9
16: 0
17: 0
18: 4 8 12 16
19: 0
20: 8 16
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, pp. 144-145, Theorem 136.

Crossrefs

Union of A027750 and nonzero terms of a(n) = A162306, thus A000005(n) + A243822(n) = A010846(n).
The union of nonzero terms of a(n) and A272619 = A133995, thus A243822(n) + A243823(n) = A045763(n).

Programs

  • Mathematica
    Table[With[{r = First /@ FactorInteger@ n}, Select[Range@ n,
    And[SubsetQ[r, Map[First, FactorInteger@ #]], ! Divisible[n, #]] &]], {n, 30}] /. {} -> 0 // Flatten (* Michael De Vlieger, May 03 2016 *)

A355432 a(n) = number of k < n such that rad(k) = rad(n) and k does not divide n, where rad(k) = A007947(k).

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Feb 22 2023

Keywords

Comments

a(n) = 0 for prime powers and squarefree numbers.

Examples

			a(1) = 18, since 18/6 >= 3. We note that rad(12) = rad(18) = 6, yet 12 does not divide 18.
a(2) = 24, since 24/6 >= 3. rad(18) = rad(24) = 6 and 24 mod 18 = 6.
a(3) = 36, since 36/6 >= 3. rad(24) = rad(36) = 6 and 36 mod 24 = 12.
a(6) = 54, since 54/6 >= 3. m in {12, 24, 36, 48} are such that rad(m) = rad(54) = 6, but none divides 54, etc.
		

Crossrefs

Programs

  • Mathematica
    rad[n_] := rad[n] = Times @@ FactorInteger[n][[All, 1]]; Table[Which[PrimePowerQ[n], 0, SquareFreeQ[n], 0, True, r = rad[n]; Count[Select[Range[n], Nor[PrimePowerQ[#], SquareFreeQ[#]] &], _?(And[rad[#] == r, Mod[n, #] != 0] &)]], {n, 120}]
  • PARI
    rad(n) = factorback(factorint(n)[, 1]); \\ A007947
    a(n) = my(rn=rad(n)); sum(k=1, n-1, if (n % k, rad(k)==rn)); \\ Michel Marcus, Feb 23 2023

Formula

a(n) > 0 for n in A360768.
a(n) < A243822(n) < A010846(n).
a(n) = A008479(n) - A005361(n). - Amiram Eldar, Oct 25 2024

A079277 Largest integer k < n such that any prime factor of k is also a prime factor of n.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 4, 3, 8, 1, 9, 1, 8, 9, 8, 1, 16, 1, 16, 9, 16, 1, 18, 5, 16, 9, 16, 1, 27, 1, 16, 27, 32, 25, 32, 1, 32, 27, 32, 1, 36, 1, 32, 27, 32, 1, 36, 7, 40, 27, 32, 1, 48, 25, 49, 27, 32, 1, 54, 1, 32, 49, 32, 25, 64, 1, 64, 27, 64, 1, 64, 1, 64, 45, 64, 49, 72, 1, 64, 27
Offset: 2

Views

Author

Istvan Beck (istbe(AT)online.no), Feb 07 2003

Keywords

Comments

The function a(n) complements Euler's phi-function: 1) a(n)+phi(n) = n if n is a power of a prime (actually, in A285710). 2) It seems also that a(n)+phi(n) >= n for "almost all numbers" (see A285709, A208815). 3) a(2n) = n+1 if and only if n is a Mersenne prime. 4) Lim a(n^k)/n^k =1 if n has at least two prime factors and k goes to infinity.
From Michael De Vlieger, Apr 26 2017: (Start)
In other words, largest integer k < n such that k | n^e with integer e >= 0.
Penultimate term of row n in A162306. (The last term of row n in A162306 is n.)
For prime p, a(p) = 1. More generally, for n with omega(n) = 1, that is, a prime power p^e with e > 0, a(p^e) = p^(e - 1).
For n with omega(n) > 1, a(n) does not divide n. If n = pq with q = p + 2, then p^2 < n though p^2 does not divide n, yet p^2 | n^e with e > 1. If n has more than 2 distinct prime divisors p, powers p^m of these divisors will appear in the range (1..n-1) such that p^m > n/lpf(n) (lpf(n) = A020639(n)). Since a(n) is the largest of these, a(n) is not a divisor of n.
If a(n) does not divide n, then a(n) appears last in row n of A272618.
(End)

Examples

			a(10)=8 since 8 is the largest integer< 10 that can be written using only the primes 2 and 5. a(78)=72 since 72 is the largest number less than 78 that can be written using only the primes 2, 3 and 13. (78=2*3*13).
		

Crossrefs

Programs

  • Mathematica
    Table[If[n == 2, 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]], {n, 2, 81}] (* Michael De Vlieger, Apr 26 2017 *)
  • PARI
    a(n) = {forstep(k = n - 1, 2, -1, f = factor(k); okk = 1; for (i=1, #f~, if ((n % f[i,1]) != 0, okk = 0; break;)); if (okk, return (k));); return (1);} \\ Michel Marcus, Jun 11 2013
    
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]); \\ Andrew Lelechenko, May 09 2014
    A079277(n) = { my(r); if((n > 1 && !bitand(n,(n-1))), (n/2), r=A007947(n); if(1==n,0,k = n-1; while(A007947(k*n) <> r, k = k-1); k)); }; \\ Antti Karttunen, Apr 26 2017
    
  • Python
    from sympy import divisors
    from sympy.ntheory.factor_ import core
    def a007947(n): return max(d for d in divisors(n) if core(d) == d)
    def a(n):
        k=n - 1
        while True:
            if a007947(k*n) == a007947(n): return k
            else: k-=1
    print([a(n) for n in range(2, 101)]) # Indranil Ghosh, Apr 26 2017

Formula

Largest k < n with rad(kn) = rad(n), where rad = A007947.

A369609 Irregular triangle read by rows where row n lists k <= n such that A007947(k) = A007947(n).

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, May 09 2024

Keywords

Comments

Differs from A284318 after 27 terms.
Let rad(x) = A007947(x).
Let T(n,k) be the k-th term of row n in this sequence.
Define S(n,k) to be the k-th term in row n of A162306.
T(n,k) = rad(n) * S(n,k), k <= A008479(n).
The number n appears as the last term in row n.

Examples

			First rows of the triangle:
  1;
  2;
  3;
  2, 4;
  5;
  6;
  7;
  2, 4, 8;
  3, 9;
  10;
  11;
  6, 12;
  13;
  14;
  15;
  2, 4, 8, 16;
  17;
  6, 12, 18;
  etc.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := f[x] = Times @@ FactorInteger[x][[All, 1]]; Flatten@ Table[r = f[n]; Select[Range[n], f[#] == r &], {n, 44}]
  • PARI
    rad(n) = factorback(factorint(n)[, 1]); \\ A007947
    row(n) = my(r=rad(n)); select(x->(rad(x) == r), [1..n]); \\ Michel Marcus, May 11 2024

Formula

Row n of this sequence contains row n of A284318.
Length of row n is A008479(n).
For squarefree n, row n = {n}.
For prime power n = p^m, row n = { p^j : j = 1..m }.

A284311 Array T(n,k) read by antidiagonals (downward): T(1,k) = A005117(k+1) (squarefree numbers > 1); for n > 1, columns are nonsquarefree numbers (in ascending order) with exactly the same prime factors as T(1,k).

Original entry on oeis.org

2, 3, 4, 5, 9, 8, 6, 25, 27, 16, 7, 12, 125, 81, 32, 10, 49, 18, 625, 243, 64, 11, 20, 343, 24, 3125, 729, 128, 13, 121, 40, 2401, 36, 15625, 2187, 256, 14, 169, 1331, 50, 16807, 48, 78125, 6561, 512, 15, 28, 2197, 14641, 80, 117649, 54, 390625, 19683, 1024
Offset: 1

Views

Author

Bob Selcoe, Mar 24 2017

Keywords

Comments

A permutation of the natural numbers > 1.
T(1,k)= A005117(m) with m > 1; terms in column k = T(1,k) * A162306(T(1,k)) only not bounded by T(1,k). Let T(1,k) = b. Terms in column k are multiples of b and numbers c such that c | b^e with e >= 0. Alternatively, terms in column k are multiples bc with c those numbers whose prime divisors p also divide b. - Michael De Vlieger, Mar 25 2017

Examples

			Array starts:
    2    3     5  6      7  10       11        13  14  15
    4    9    25 12     49  20      121       169  28  45
    8   27   125 18    343  40     1331      2197  56  75
   16   81   625 24   2401  50    14641    371293  98 135
   32  243  3125 36  16807  80   161051   4826809 112 225
   64  729 15625 48 117649 100  1771561  62748517 196 375
  128 2187 78125 54 823543 160 19487171 815730721 224 405
Column 6 is: T(1,6) = 2*5; T(2,6) = 2^2*5; T(3,6) = 2^3*5; T(4,6) = 2*5^2; T(5,6) = 2^4*5, etc.
		

Crossrefs

Cf. A005117 (squarefree numbers), A033845 (column 4), columns 1,2,3,5 are powers of primes, A033846 (column 6), A033847 (column 9), A033849 (column 10).
The columns that are powers of primes have indices A071403(n) - 1. - Michel Marcus, Mar 24 2017
See also A007947; the k-th column of the array corresponds to the numbers with radical A005117(k+1). - Rémy Sigrist, Mar 24 2017
Cf. A284457 (this sequence read by antidiagonals upwards), A285321 (a similar array, but columns come in different order).
Cf. A065642.
Cf. A008479 (index of the row where n is located), A285329 (of the column).

Programs

  • Mathematica
    f[n_, k_: 1] := Block[{c = 0, sgn = Sign[k], sf}, sf = n + sgn; While[c < Abs[k], While[! SquareFreeQ@ sf, If[sgn < 0, sf--, sf++]]; If[sgn < 0, sf--, sf++]; c++]; sf + If[sgn < 0, 1, -1]] (* after Robert G. Wilson v at A005117 *); T[n_, k_] := T[n, k] = Which[And[n == 1, k == 1], 2, k == 1, f@ T[n - 1, k], PrimeQ@ T[n, 1], T[n, 1]^k, True, Module[{j = T[n, k - 1]/T[n, 1] + 1}, While[PowerMod[T[n, 1], j, j] != 0, j++]; j T[n, 1]]]; Table[T[n - k + 1, k], {n, 10}, {k, n}] // Flatten (* Michael De Vlieger, Mar 25 2017 *)
  • Scheme
    (define (A284311 n) (A284311bi  (A002260 n) (A004736 n)))
    (define (A284311bi row col) (if (= 1 row) (A005117 (+ 1 col)) (A065642 (A284311bi (- row 1) col))))
    ;; Antti Karttunen, Apr 17 2017

Formula

From Antti Karttunen, Apr 17 2017: (Start)
A(1,k) = A005117(1+k), A(n,k) = A065642(A(n-1,k)).
A(A008479(n), A285329(n)) = n for all n >= 2.
(End)
Showing 1-10 of 63 results. Next