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 12 results. Next

A285699 a(1) = 1; for n > 1, a(n) = n - A079277(n).

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 4, 6, 2, 10, 3, 12, 6, 6, 8, 16, 2, 18, 4, 12, 6, 22, 6, 20, 10, 18, 12, 28, 3, 30, 16, 6, 2, 10, 4, 36, 6, 12, 8, 40, 6, 42, 12, 18, 14, 46, 12, 42, 10, 24, 20, 52, 6, 30, 7, 30, 26, 58, 6, 60, 30, 14, 32, 40, 2, 66, 4, 42, 6, 70, 8, 72, 10, 30, 12, 28, 6, 78, 16, 54, 18, 82, 3, 60, 22, 6, 24, 88, 9, 42, 28, 12, 30, 70, 15, 96, 34, 18, 20
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Comments

The scatter plot has unusual "rays".

Crossrefs

Programs

  • Mathematica
    Table[n - If[n <= 2, n - 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]], {n, 100}] (* Michael De Vlieger, Apr 26 2017 *)
  • Python
    from sympy import divisors
    from sympy.ntheory.factor_ import core
    def a007947(n): return max(i for i in divisors(n) if core(i) == i)
    def a079277(n):
        k=n - 1
        while True:
            if a007947(k*n) == a007947(n): return k
            else: k-=1
    def a(n): return 1 if n<2 else n - a079277(n)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 26 2017
  • Scheme
    (define (A285699 n) (if (= 1 n) n (- n (A079277 n))))
    

Formula

a(1) = 1; for n > 1, a(n) = n - A079277(n).
Other identities. For all n >= 1:
a(A285710(n)) = A000010(A285710(n)). [A285710 gives all such matches.]

A285711 a(n) = gcd(A051953(n), A079277(n)), a(1) = 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 1, 4, 3, 2, 1, 1, 1, 8, 1, 8, 1, 4, 1, 4, 9, 4, 1, 2, 5, 2, 9, 16, 1, 1, 1, 16, 1, 2, 1, 8, 1, 4, 3, 8, 1, 6, 1, 8, 3, 8, 1, 4, 7, 10, 1, 4, 1, 12, 5, 1, 3, 2, 1, 2, 1, 32, 1, 32, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 5, 8, 1, 18, 1, 16, 27, 2, 1, 3, 1, 4, 1, 16, 1, 3, 1, 16, 3, 16, 1, 1, 1, 8, 3, 20, 1, 2, 1, 8, 3, 2, 1, 24, 1, 10, 3, 2, 1, 6, 1
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[GCD[n - EulerPhi@ n, If[n <= 2, 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]]], {n, 115}] (* Michael De Vlieger, Apr 26 2017 *)
  • Python
    from sympy import divisors, totient, gcd
    from sympy.ntheory.factor_ import core
    def a007947(n): return max(i for i in divisors(n) if core(i) == i)
    def a079277(n):
        k=n - 1
        while True:
            if a007947(k*n) == a007947(n): return k
            else: k-=1
    def a(n): return 1 if n==1 else gcd(n - totient(n), a079277(n))
    print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Apr 26 2017
  • Scheme
    (define (A285711 n) (if (= 1 n) n (gcd (A051953 n) (A079277 n))))
    

Formula

a(1) = 1; for n > 1, a(n) = gcd(A051953(n), A079277(n)).

A208815 n for which A079277(n) + phi(n) < n.

Original entry on oeis.org

115, 329, 1243, 2119, 2171, 4709, 4777, 4811, 6593, 6631, 6707, 6821, 11707, 11983, 12029, 14597, 15463, 16793, 23809, 23867, 23983, 24041, 24331, 29047, 29171, 29357, 29543, 50357, 50579, 67937, 68183, 68347, 68429, 77873, 78389, 78733, 79421, 83351, 83453, 102413
Offset: 1

Views

Author

Robert Israel, Mar 01 2012

Keywords

Comments

Includes (among other terms, see below) semiprimes pq where p and q are primes with p^k-p+1 < q < p^k for an integer k>1. In particular, by the Prime Number Theorem this sequence is infinite. - clarified by Antti Karttunen, Apr 26 2017
From Antti Karttunen, Apr 26 2017: (Start)
Numbers n for which A051953(n) > A079277(n).
Factorization of terms a(1) .. a(29): 5*23, 7*47, 11*113, 13*163, 13*167, 17*277, 17*281, 17*283, 19*347, 19*349, 19*353, 19*359, 23*509, 23*521, 23*523, 11*1327, 7*47*47, 7*2399, 29*821, 29*823, 29*827, 29*829, 29*839, 31*937, 31*941, 31*947, 31*953, 37*1361, 37*1367. Note that a(17) = 15463 is not a semiprime.
(End)

Examples

			A079277(115) + phi(115) = 25 + 88 = 113 < 115 so 115 is in the sequence, where phi = A000010.
		

Crossrefs

Positions of negative terms in A285709.

Programs

  • Mathematica
    Select[Range[2, 10^4], Function[n, If[n == 2, 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]] + EulerPhi@ n < n]] (* or *)
    Do[If[If[n == 2, 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]] + EulerPhi@ n < n, Print@ n], {n, 2, 10^5}] (* Michael De Vlieger, Apr 27 2017 *)

Extensions

a(28)-a(29) from Antti Karttunen, Apr 26 2017
a(30)-a(40) from David A. Corneth, Apr 26 2017

A285707 a(n) = gcd(n, A079277(n)), a(1) = 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 3, 1, 2, 3, 8, 1, 2, 1, 4, 3, 2, 1, 6, 5, 2, 9, 4, 1, 3, 1, 16, 3, 2, 5, 4, 1, 2, 3, 8, 1, 6, 1, 4, 9, 2, 1, 12, 7, 10, 3, 4, 1, 6, 5, 7, 3, 2, 1, 6, 1, 2, 7, 32, 5, 2, 1, 4, 3, 2, 1, 8, 1, 2, 15, 4, 7, 6, 1, 16, 27, 2, 1, 3, 5, 2, 3, 8, 1, 9, 7, 4, 3, 2, 5, 3, 1, 2, 9, 20, 1, 6, 1, 8, 3, 2, 1, 12, 1, 10, 3, 14, 1, 6, 5, 4, 9
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[GCD[n, #] &@ If[n <= 2, 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]], {n, 117}] (* Michael De Vlieger, Apr 26 2017 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]);
    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)); };
    A285707(n) = if(1==n,n,gcd(A079277(n),n));
    
  • Python
    from sympy import divisors, gcd
    from sympy.ntheory.factor_ import core
    def a007947(n):
        return max(i for i in divisors(n) if core(i) == i)
    def a079277(n):
        k=n - 1
        while True:
            if a007947(k*n) == a007947(n): return k
            else: k-=1
    def a(n): return 1 if n==1 else gcd(n, a079277(n))
    print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Apr 26 2017
  • Scheme
    (define (A285707 n) (if (= 1 n) n (gcd n (A079277 n))))
    

Formula

a(1) = 1; for n > 1, a(n) = gcd(n, A079277(n)) = gcd(n, A285699(n)).
a(n) = n / A285708(n).

A007947 Largest squarefree number dividing n: the squarefree kernel of n, rad(n), radical of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 6, 13, 14, 15, 2, 17, 6, 19, 10, 21, 22, 23, 6, 5, 26, 3, 14, 29, 30, 31, 2, 33, 34, 35, 6, 37, 38, 39, 10, 41, 42, 43, 22, 15, 46, 47, 6, 7, 10, 51, 26, 53, 6, 55, 14, 57, 58, 59, 30, 61, 62, 21, 2, 65, 66, 67, 34, 69, 70, 71, 6, 73, 74, 15, 38, 77, 78
Offset: 1

Views

Author

R. Muller, Mar 15 1996

Keywords

Comments

Multiplicative with a(p^e) = p.
Product of the distinct prime factors of n.
a(k)=k for k=squarefree numbers A005117. - Lekraj Beedassy, Sep 05 2006
A note on square roots of numbers: we can write sqrt(n) = b*sqrt(c) where c is squarefree. Then b = A000188(n) is the "inner square root" of n, c = A007913(n), b*c = A019554(n) = "outer square root" of n, and a(n) = lcm(a(b),c). Unless n is biquadrateful (A046101), a(n) = lcm(b,c). [Edited by Jeppe Stig Nielsen, Oct 10 2021, and Andrey Zabolotskiy, Feb 12 2025]
a(n) = A128651(A129132(n-1) + 2) for n > 1. - Reinhard Zumkeller, Mar 30 2007
Also the least common multiple of the prime factors of n. - Peter Luschny, Mar 22 2011
The Mobius transform of the sequence generates the sequence of absolute values of A097945. - R. J. Mathar, Apr 04 2011
Appears to be the period length of k^n mod n. For example, n^12 mod 12 has period 6, repeating 1,4,9,4,1,0, so a(12)= 6. - Gary Detlefs, Apr 14 2013
a(n) differs from A014963(n) when n is a term of A024619. - Eric Desbiaux, Mar 24 2014
a(n) is also the smallest base (also termed radix) for which the representation of 1/n is of finite length. For example a(12) = 6 and 1/12 in base 6 is 0.03, which is of finite length. - Lee A. Newberg, Jul 27 2016
a(n) is also the divisor k of n such that d(k) = 2^omega(n). a(n) is also the smallest divisor u of n such that n divides u^n. - Juri-Stepan Gerasimov, Apr 06 2017

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 2*x^4 + 5*x^5 + 6*x^6 + 7*x^7 + 2*x^8 + 3*x^9 + ... - _Michael Somos_, Jul 15 2018
		

Crossrefs

See A007913, A062953, A000188, A019554, A003557, A066503, A087207 for other properties related to square and squarefree divisors of n.
More general factorization-related properties, specific to n: A020639, A028234, A020500, A010051, A284318, A000005, A001221, A005361, A034444, A014963, A128651, A267116.
Range of values is A005117.
Bisections: A099984, A099985.
Sequences about numbers that have the same squarefree kernel: A065642, array A284311 (A284457).
A003961, A059896 are used to express relationship between terms of this sequence.

Programs

  • Haskell
    a007947 = product . a027748_row  -- Reinhard Zumkeller, Feb 27 2012
    
  • Magma
    [ &*PrimeDivisors(n): n in [1..100] ]; // Klaus Brockhaus, Dec 04 2008
    
  • Maple
    with(numtheory); A007947 := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := mul(t1[i][1],i=1..nops(t1)); end;
    A007947 := n -> ilcm(op(numtheory[factorset](n))):
    seq(A007947(i),i=1..69); # Peter Luschny, Mar 22 2011
    A:= n -> convert(numtheory:-factorset(n),`*`):
    seq(A(n),n=1..100); # Robert Israel, Aug 10 2014
    seq(NumberTheory:-Radical(n), n = 1..78); # Peter Luschny, Jul 20 2021
  • Mathematica
    rad[n_] := Times @@ (First@# & /@ FactorInteger@ n); Array[rad, 78] (* Robert G. Wilson v, Aug 29 2012 *)
    Table[Last[Select[Divisors[n],SquareFreeQ]],{n,100}] (* Harvey P. Dale, Jul 14 2014 *)
    a[ n_] := If[ n < 1, 0, Sum[ EulerPhi[d] Abs @ MoebiusMu[d], {d, Divisors[ n]}]]; (* Michael Somos, Jul 15 2018 *)
    Table[Product[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    a(n) = factorback(factorint(n)[,1]); \\ Andrew Lelechenko, May 09 2014
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 + p*X - X)/(1 - X))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020
    
  • Python
    from sympy import primefactors, prod
    def a(n): return 1 if n < 2 else prod(primefactors(n))
    [a(n) for n in range(1, 51)]  # Indranil Ghosh, Apr 16 2017
    
  • Sage
    def A007947(n): return mul(p for p in prime_divisors(n))
    [A007947(n) for n in (1..60)] # Peter Luschny, Mar 07 2017
    
  • Scheme
    (define (A007947 n) (if (= 1 n) n (* (A020639 n) (A007947 (A028234 n))))) ;; ;; Needs also code from A020639 and A028234. - Antti Karttunen, Jun 18 2017

Formula

If n = Product_j (p_j^k_j) where p_j are distinct primes, then a(n) = Product_j (p_j).
a(n) = Product_{k=1..A001221(n)} A027748(n,k). - Reinhard Zumkeller, Aug 27 2011
Dirichlet g.f.: zeta(s)*Product_{primes p} (1+p^(1-s)-p^(-s)). - R. J. Mathar, Jan 21 2012
a(n) = Sum_{d|n} phi(d) * mu(d)^2 = Sum_{d|n} |A097945(d)|. - Enrique Pérez Herrero, Apr 23 2012
a(n) = Product_{d|n} d^moebius(n/d) (see Billal link). - Michel Marcus, Jan 06 2015
a(n) = n/( Sum_{k=1..n} (floor(k^n/n)-floor((k^n - 1)/n)) ) = e^(Sum_{k=2..n} (floor(n/k) - floor((n-1)/k))*A010051(k)*M(k)) where M(n) is the Mangoldt function. - Anthony Browne, Jun 17 2016
a(n) = n/A003557(n). - Juri-Stepan Gerasimov, Apr 07 2017
G.f.: Sum_{k>=1} phi(k)*mu(k)^2*x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 11 2017
From Antti Karttunen, Jun 18 2017: (Start)
a(1) = 1; for n > 1, a(n) = A020639(n) * a(A028234(n)).
a(n) = A019565(A087207(n)). (End)
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{primes p} (1 + p^(1-2*s) - p^(2-2*s) - p^(-s)). - Vaclav Kotesovec, Dec 18 2019
From Peter Munn, Jan 01 2020: (Start)
a(A059896(n,k)) = A059896(a(n), a(k)).
a(A003961(n)) = A003961(a(n)).
a(n^2) = a(n).
a(A225546(n)) = A019565(A267116(n)). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = A065463/2. - Vaclav Kotesovec, Jun 24 2020
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} mu(n/gcd(n,k))^2.
a(n) = Sum_{k=1..n} mu(gcd(n,k))^2*phi(gcd(n,k))/phi(n/gcd(n,k)).
For n>1, Sum_{k=1..n} a(gcd(n,k))*mu(a(gcd(n,k)))*phi(gcd(n,k))/gcd(n,k) = 0.
For n>1, Sum_{k=1..n} a(n/gcd(n,k))*mu(a(n/gcd(n,k)))*phi(gcd(n,k))*gcd(n,k) = 0. (End)
a(n) = (-1)^omega(n) * Sum_{d|n} mu(d)*psi(d), where omega = A001221 and psi = A001615. - Ridouane Oudra, Aug 01 2025

Extensions

More terms from several people including David W. Wilson
Definition expanded by Jonathan Sondow, Apr 26 2013

A285328 a(n) = 1 if n is squarefree (A005117), otherwise a(n) = Max {m < n | same prime factors as n, ignoring multiplicity}.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 3, 1, 1, 6, 1, 1, 1, 8, 1, 12, 1, 10, 1, 1, 1, 18, 5, 1, 9, 14, 1, 1, 1, 16, 1, 1, 1, 24, 1, 1, 1, 20, 1, 1, 1, 22, 15, 1, 1, 36, 7, 40, 1, 26, 1, 48, 1, 28, 1, 1, 1, 30, 1, 1, 21, 32, 1, 1, 1, 34, 1, 1, 1, 54, 1, 1, 45, 38, 1, 1, 1, 50, 27, 1, 1, 42, 1, 1, 1, 44, 1, 60, 1, 46, 1, 1, 1, 72, 1, 56, 33, 80, 1, 1, 1, 52, 1, 1, 1, 96
Offset: 1

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Examples

			From _Michael De Vlieger_, Dec 31 2018: (Start)
a(1) = 1 since 1 is squarefree.
a(2) = 1 since 2 is squarefree.
a(4) = 2 since 4 is not squarefree and 2 is the largest number less than 4 that has all the distinct prime divisors that 4 has.
a(6) = 1 since 6 is squarefree.
a(12) = 6 since 12 is not squarefree and 6 is the largest number less than 12 that has all the distinct prime divisors that 12 has. (6 is also the squarefree root of 12).
a(16) = 8 since 16 is not squarefree and 8 is the largest number less than 16 that has all the distinct prime divisors that 16 has.
a(18) = 12 since 18 is not squarefree and 12 is the largest number less than 18 that has all the distinct prime divisors that 18 has.
(End)
		

Crossrefs

A left inverse of A065642.
Cf. also A079277.

Programs

  • Mathematica
    Table[With[{r = DivisorSum[n, EulerPhi[#] Abs@ MoebiusMu[#] &]}, If[MoebiusMu@ n != 0, 1, SelectFirst[Range[n - 2, 2, -1], DivisorSum[#, EulerPhi[#] Abs@ MoebiusMu[#] &] == r &]]], {n, 108}] (* Michael De Vlieger, Dec 31 2018 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]); \\ From Andrew Lelechenko, May 09 2014
    A285328(n) = { my(r=A007947(n)); if(core(n)==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n); }; \\ After Python-code below - Antti Karttunen, Apr 17 2017
    A285328(n) = { my(r); if((n > 1 && !bitand(n,(n-1))),(n/2), r=A007947(n); if(r==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n)); }; \\ Version optimized for powers of 2.
    
  • Python
    from operator import mul
    from sympy import primefactors
    from sympy.ntheory.factor_ import core
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a(n):
        if core(n) == n: return 1
        r = a007947(n)
        k = n - r
        while k>0:
            if a007947(k) == r: return k
            else: k -= r
    print([a(n) for n in range(1, 121)]) # Indranil Ghosh and Antti Karttunen, Apr 17 2017
  • Scheme
    (definec (A285328 n) (if (not (zero? (A008683 n))) 1 (let ((k (A007947 n))) (let loop ((n (- n k))) (if (= (A007947 n) k) n (loop (- n k)))))))
    

Formula

If A008683(n) <> 0, a(n) = 1, otherwise a(n) = the largest number k < n for which A007947(k) = A007947(n).
Other identities. For all n >= 1:
a(A065642(n)) = n.

A289280 a(n) = least integer k > n such that any prime factor of k is also a prime factor of n.

Original entry on oeis.org

4, 9, 8, 25, 8, 49, 16, 27, 16, 121, 16, 169, 16, 25, 32, 289, 24, 361, 25, 27, 32, 529, 27, 125, 32, 81, 32, 841, 32, 961, 64, 81, 64, 49, 48, 1369, 64, 81, 50, 1681, 48, 1849, 64, 75, 64, 2209, 54, 343, 64, 81, 64, 2809, 64, 121, 64, 81, 64, 3481, 64, 3721
Offset: 2

Views

Author

Rémy Sigrist, Jul 01 2017

Keywords

Comments

In other words:
- a(n) is the least k > n such that rad(k) divides rad(n), where rad = A007947,
- or, if P_n denotes the set of prime factors of n, then a(n) is the least P_n-smooth number > n.
For any n > 1, n < a(n) <= n*lpf(n), where lpf = A020639.
a(p^k) = p^(k+1) for any prime p and k > 0.
a(n) is never squarefree.
This sequence has connections with A079277:
- here we search the least P_n-smooth number > n, there the largest < n,
- also, if omega(n) > 1 (where omega = A001221),
then n/lpf(n) < A001221(n) < n,
so n < A001221(n)*lpf(n) < n*lpf(n),
as A001221(n)*lpf(n) is P_n-smooth,
we have a(n) <= A001221(n)*lpf(n) < n*lpf(n),
and n cannot divide a(n).
The (logarithmic) scatterplot of the sequence has horizontal rays similar to those observed for A079277; they correspond to frequent values, typically with a small number of distinct prime divisors (see also scatterplots in Links section).
Given n < a(n) <= n*lpf(n), a(n) | n^m with m >= 2. Values of m: {2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 3, 2, 2, 3, 5, 2, 3, 2, ...}. - Michael De Vlieger, Jul 02 2017

Examples

			For n = 42:
- 42 = 2 * 3 * 7, hence P_42 = { 2, 3, 7 },
- the P_42-smooth numbers are: 1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 16, 18, 21, 24, 27, 28, 32, 36, 42, 48, 49, ...
- hence a(42) = 48.
From _Michael De Vlieger_, Jul 02 2017: (Start)
a(n) divides n^m with m >= 2:
   n   a(n)    m
   2     4     2
   3     9     2
   4     8     2
   5    25     2
   6     8     3
   7    49     2
   8    16     2
   9    27     2
  10    16     4
  11   121     2
  12    16     2
  13   169     2
  14    16     4
  15    25     2
  16    32     2
  17   289     2
  18    24     3
  19   361     2
  20    25     2
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[Which[PrimeQ@ n, n^2, PrimePowerQ@ n, Block[{p = 2, e}, While[Set[e, IntegerExponent[n, p]] == 0, p = NextPrime@ p]; p^(e + 1)], True, Block[{k = n + 1}, While[PowerMod[n, k, k] != 0, k++]; k]], {n, 2, 61}] (* Michael De Vlieger, Jul 02 2017 *)
  • PARI
    \\ See Links section.

A285710 Numbers n for which A000010(n) = A285699(n); positions of zeros in A285709.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 16, 17, 19, 21, 23, 25, 27, 28, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 62, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 124, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 237
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Comments

After a(1) = 1, also numbers n such that A051953(n) = A079277(n).

Crossrefs

Positions of zeros in A285709.
Cf. A000961 (a subsequence).

Programs

  • Mathematica
    Flatten@ Position[#, 0] &@ Table[EulerPhi@ n - (n - If[n <= 2, n - 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]]), {n, 240}] (* Michael De Vlieger, Apr 26 2017 *)
  • Python
    from sympy import divisors, totient
    from sympy.ntheory.factor_ import core
    def a007947(n): return max(i for i in divisors(n) if core(i) == i)
    def a079277(n):
        k=n - 1
        while True:
            if a007947(k*n) == a007947(n): return k
            else: k-=1
    def a285699(n): return 1 if n<2 else n - a079277(n)
    print([n for n in range(1, 301) if totient(n) == a285699(n)]) # Indranil Ghosh, Apr 26 2017

A285709 a(n) = A000010(n) - A285699(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 2, 0, 0, 4, 0, 4, 0, 4, 0, 2, 0, 2, 0, 0, 0, 5, 0, 0, 14, 14, 14, 8, 0, 12, 12, 8, 0, 6, 0, 8, 6, 8, 0, 4, 0, 10, 8, 4, 0, 12, 10, 17, 6, 2, 0, 10, 0, 0, 22, 0, 8, 18, 0, 28, 2, 18, 0, 16, 0, 26, 10, 24, 32, 18, 0, 16, 0, 22, 0, 21, 4, 20, 50, 16, 0, 15, 30, 16, 48, 16, 2, 17, 0, 8, 42, 20, 0, 26, 0, 8, 24, 10, 0, 24, 0, 30, 42, 34, 0, 30, -2
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Comments

The scatter plot has unusual "rays".

Crossrefs

Cf. A285710 (positions of zeros), A208815 (of negative terms).

Programs

  • Mathematica
    Table[EulerPhi@ n - (n - If[n <= 2, n - 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]]), {n, 115}] (* Michael De Vlieger, Apr 26 2017 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]); \\ From 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)); };
    A285709(n) = if(!n,n,(eulerphi(n)+A079277(n))-n);
    
  • Python
    from sympy import divisors, totient
    from sympy.ntheory.factor_ import core
    def a007947(n): return max(i for i in divisors(n) if core(i) == i)
    def a079277(n):
        k=n - 1
        while True:
            if a007947(k*n) == a007947(n): return k
            else: k-=1
    def a285699(n): return 1 if n<2 else n - a079277(n)
    def a(n): return totient(n) - a285699(n)
    print([a(n) for n in range(1, 116)]) # Indranil Ghosh, Apr 26 2017
  • Scheme
    (define (A285709 n) (- (A000010 n) (A285699 n)))
    

Formula

a(n) = A000010(n) - A285699(n).
For n > 1, a(n) = (A000010(n) + A079277(n)) - n = A079277(n) - A051953(n).

A206242 a(n) is the least number j such that, for any integer k > 0, the base-n representations of the numbers k, 2k, ..., j*k together include every base-n digit.

Original entry on oeis.org

2, 3, 6, 5, 20, 7, 28, 24, 72, 11, 99, 13, 104, 126, 120, 17, 272, 19, 304, 180, 336, 23, 414, 120, 400, 234, 432, 29, 783, 31, 496, 864, 1056, 850, 1120, 37, 1184, 1026, 1248, 41, 1476, 43, 1376, 1188, 1440, 47, 1692, 336, 1960, 1350, 1632, 53, 2544, 1350
Offset: 2

Views

Author

David W. Wilson, Feb 05 2012

Keywords

Examples

			In base 7, for any k > 0, the numbers k,2k,...,7k together include every base-7 digit. k = 1 is the smallest number for which we need to go up to 7k to encounter digit 0 in 7k = 7 = 10_7. Hence a(7) = 7 and A206243(7) = 1.
In base 10, for any k > 0, the numbers k,2k,...,72k together include every base-10 digit. k = 125 is the smallest number for which we need to go up to 72k = 9000 to encounter digit 9. Hence a(10) = 72 and A206243(7) = 125.
		

Crossrefs

Cf. A079277, A206243 (smallest value of k for which a(n) is required).

Formula

a(n) = n if n prime; (n-1)*A079277(n) otherwise.
Showing 1-10 of 12 results. Next