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.

Previous Showing 11-20 of 252 results. Next

A286472 Compound filter (for counting prime gaps): a(1) = 1, a(n) = 2*A032742(n) + (1 if n is composite and spf(A032742(n)) > nextprime(spf(n)), and 0 otherwise). Here spf is the smallest prime factor, A020639.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 6, 11, 2, 12, 2, 15, 10, 16, 2, 18, 2, 20, 15, 23, 2, 24, 10, 27, 18, 28, 2, 30, 2, 32, 23, 35, 14, 36, 2, 39, 27, 40, 2, 42, 2, 44, 30, 47, 2, 48, 14, 51, 35, 52, 2, 54, 23, 56, 39, 59, 2, 60, 2, 63, 42, 64, 27, 66, 2, 68, 47, 71, 2, 72, 2, 75, 50, 76, 22, 78, 2
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Comments

For n > 1, a(n) is odd if and only if n is a composite with its smallest prime factor occurring only once and with a gap of at least one between the smallest and the next smallest prime factor.
For all i, j: a(i) = a(j) => A073490(i) = A073490(j). This follows because A073490(n) can be computed by recursively invoking a(n), without needing any other information.

Examples

			For n = 4 = 2*2, the two smallest prime factors (taken with multiplicity) are 2 and 2, and the difference between their indices is 0, thus a(4) = 2*A032742(4) + 0 = 2*(4/2) + 0 = 2.
For n = 6 = 2*3 = prime(1)*prime(2), the difference between the indices of two smallest prime factors is 1 (which is less than required 2), thus a(6) = 2*A032742(6) + 0 = 2*(6/2) + 0 = 6.
For n = 10 = 2*5 = prime(1)*prime(3), the difference between the indices of two smallest prime factors is 2, thus a(10) = 2*A032742(10) + 1 = 2*(10/2) + 1 = 11.
		

Crossrefs

Cf. A000040 (primes give the positions of 2's).
Cf. A073490 (one of the matched sequences).

Programs

  • Mathematica
    Table[Function[{p, d}, 2 d + If[And[CompositeQ@ n, FactorInteger[d][[1, 1]] > NextPrime[p]], 1, 0] - Boole[n == 1]] @@ {#, n/#} &@ FactorInteger[n][[1, 1]], {n, 98}] (* Michael De Vlieger, May 12 2017 *)
  • Python
    from sympy import primefactors, divisors, nextprime
    def ok(n): return 1 if isprime(n)==0 and min(primefactors(divisors(n)[-2])) > nextprime(min(primefactors(n))) else 0
    def a(n): return 1 if n==1 else 2*divisors(n)[-2] + ok(n) # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286472 n) (if (= 1 n) n (+ (* 2 (A032742 n)) (if (> (A286471 n) 2) 1 0))))
    

Formula

a(n) = 2*A032742(n) + [A286471(n) > 2], a(1) = 1.

A286473 Compound filter (for counting primes of form 4k+1, 4k+2 and 4k+3): a(n) = 4*A032742(n) + (A020639(n) mod 4), a(1) = 1.

Original entry on oeis.org

1, 6, 7, 10, 5, 14, 7, 18, 15, 22, 7, 26, 5, 30, 23, 34, 5, 38, 7, 42, 31, 46, 7, 50, 21, 54, 39, 58, 5, 62, 7, 66, 47, 70, 29, 74, 5, 78, 55, 82, 5, 86, 7, 90, 63, 94, 7, 98, 31, 102, 71, 106, 5, 110, 45, 114, 79, 118, 7, 122, 5, 126, 87, 130, 53, 134, 7, 138, 95, 142, 7, 146, 5, 150, 103, 154, 47, 158, 7, 162, 111, 166, 7, 170, 69, 174, 119, 178, 5, 182, 55
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Comments

For all i, j: a(i) = a(j) => A079635(i) = A079635(j). This follows because A079635(n) can be computed by recursively invoking a(n), without needing any other information.

Crossrefs

Cf. A001511, A007814, A065339, A079635, A083025 (some of the matched sequences).

Programs

  • Mathematica
    With[{k = 4}, Table[Function[{p, d}, k d + Mod[p, k] - k Boole[n == 1]] @@ {#, n/#} &@ FactorInteger[n][[1, 1]], {n, 91}]] (* Michael De Vlieger, May 12 2017 *)
  • Python
    from sympy import divisors, primefactors
    def a(n): return 1 if n==1 else 4*divisors(n)[-2] + (min(primefactors(n))%4) # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286473 n) (if (= 1 n) n (+ (* 4 (A032742 n)) (modulo (A020639 n) 4))))
    

Formula

a(1) = 1, for n > 1, a(n) = 4*A032742(n) + (A020639(n) mod 4).

A286474 Compound filter: a(n) = 4*A032742(n) + (n mod 4), a(1) = 1.

Original entry on oeis.org

1, 6, 7, 8, 5, 14, 7, 16, 13, 22, 7, 24, 5, 30, 23, 32, 5, 38, 7, 40, 29, 46, 7, 48, 21, 54, 39, 56, 5, 62, 7, 64, 45, 70, 31, 72, 5, 78, 55, 80, 5, 86, 7, 88, 61, 94, 7, 96, 29, 102, 71, 104, 5, 110, 47, 112, 77, 118, 7, 120, 5, 126, 87, 128, 53, 134, 7, 136, 93, 142, 7, 144, 5, 150, 103, 152, 45, 158, 7, 160, 109, 166, 7, 168, 69, 174, 119, 176, 5, 182, 55
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[n == 1, 1, 4 (Divisors[n][[-2]]) + Mod[n, 4]], {n, 91}] (* Michael De Vlieger, May 12 2017 *)
  • Python
    from sympy import divisors, primefactors
    def a(n): return 1 if n==1 else 4*divisors(n)[-2] + n%4 # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286474 n) (if (= 1 n) n (+ (* 4 (A032742 n)) (modulo n 4))))
    

Formula

a(1) = 1, for n > 1, a(n) = 4*A032742(n) + (n mod 4).

A286476 Compound filter: a(n) = 6*A032742(n) + (n mod 6), a(1) = 1.

Original entry on oeis.org

1, 8, 9, 16, 11, 18, 7, 26, 21, 34, 11, 36, 7, 44, 33, 52, 11, 54, 7, 62, 45, 70, 11, 72, 31, 80, 57, 88, 11, 90, 7, 98, 69, 106, 47, 108, 7, 116, 81, 124, 11, 126, 7, 134, 93, 142, 11, 144, 43, 152, 105, 160, 11, 162, 67, 170, 117, 178, 11, 180, 7, 188, 129, 196, 83, 198, 7, 206, 141, 214, 11, 216, 7, 224, 153, 232, 71, 234, 7, 242, 165, 250, 11, 252, 103
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Crossrefs

Programs

  • Mathematica
    With[{k = 6}, Table[If[n == 1, 1, k (Divisors[n][[-2]]) + Mod[n, k]], {n, 85}]] (* Michael De Vlieger, May 12 2017 *)
  • Python
    from sympy import divisors
    def a(n): return 1 if n==1 else 6*divisors(n)[-2] + n%6 # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286476 n) (if (= 1 n) n (+ (* 6 (A032742 n)) (modulo n 6))))
    

Formula

a(1) = 1, for n > 1, a(n) = 6*A032742(n) + (n mod 6).

A300236 Möbius transform of A032742 (the largest proper divisor of n).

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 2, 2, 4, 0, 2, 0, 6, 4, 4, 0, 4, 0, 4, 6, 10, 0, 4, 4, 12, 6, 6, 0, 4, 0, 8, 10, 16, 6, 6, 0, 18, 12, 8, 0, 6, 0, 10, 8, 22, 0, 8, 6, 16, 16, 12, 0, 12, 10, 12, 18, 28, 0, 8, 0, 30, 12, 16, 12, 10, 0, 16, 22, 18, 0, 12, 0, 36, 16, 18, 10, 12, 0, 16, 18, 40, 0, 12, 16, 42, 28, 20, 0, 16, 12, 22, 30, 46, 18, 16, 0, 36
Offset: 1

Views

Author

Antti Karttunen, Mar 10 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, # MoebiusMu[n/#]/FactorInteger[#][[1, 1]] &], {n, 98}] (* Michael De Vlieger, Mar 10 2018 *)
  • PARI
    A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));
    A300236(n) = sumdiv(n,d,moebius(n/d)*A032742(d));

Formula

a(n) = Sum_{d|n} A008683(n/d)*A032742(d).

A318508 a(n) = A032742(n) AND A001065(n)-A032742(n), where AND is bitwise-and (A004198) and A001065 = sum of proper divisors and A032742 = the largest proper divisor of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 0, 0, 1, 1, 0, 2, 0, 3, 4, 0, 0, 8, 0, 8, 4, 3, 0, 8, 1, 1, 0, 14, 0, 11, 0, 0, 0, 1, 6, 0, 0, 3, 4, 20, 0, 1, 0, 18, 2, 3, 0, 16, 1, 16, 0, 16, 0, 3, 2, 4, 0, 1, 0, 14, 0, 3, 20, 0, 4, 33, 0, 0, 4, 35, 0, 4, 0, 1, 24, 2, 8, 35, 0, 0, 9, 1, 0, 34, 0, 3, 4, 32, 0, 33, 8, 14, 4, 3, 2, 32, 0, 16, 0, 2, 0, 51, 0, 52, 32
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A004198(A032742(n), A318505(n)).
For n > 1, a(n) = A001065(n) - A318506(n) = (A001065(n) - A318507(n))/2.

A249744 a(n) = 0 if n is 1 or a prime, otherwise, when n = A020639(n) * A032742(n), a(n) = the largest m < n such that A020639(m) = A020639(n), where A020639(n) and A032742(n) are the smallest prime and the largest proper divisor dividing n.

Original entry on oeis.org

0, 0, 0, 2, 0, 4, 0, 6, 3, 8, 0, 10, 0, 12, 9, 14, 0, 16, 0, 18, 15, 20, 0, 22, 5, 24, 21, 26, 0, 28, 0, 30, 27, 32, 25, 34, 0, 36, 33, 38, 0, 40, 0, 42, 39, 44, 0, 46, 7, 48, 45, 50, 0, 52, 35, 54, 51, 56, 0, 58, 0, 60, 57, 62, 55, 64, 0, 66, 63, 68, 0, 70, 0, 72, 69, 74, 49, 76, 0, 78, 75, 80, 0, 82, 65, 84, 81, 86, 0, 88, 77, 90, 87, 92, 85, 94, 0, 96, 93, 98, 0, 100
Offset: 1

Views

Author

Antti Karttunen, Dec 06 2014

Keywords

Comments

For all composite numbers, a(n) tells what is the previous number processed by the sieve of Eratosthenes, i.e., number which is immediately left of n on the same row where n is in arrays like A083140, A083221.

Crossrefs

Can be used to compute A078898.

Programs

Formula

a(n) = A020639(n) * A249738(n).
Other identities. For all n >= 1 it holds:
a(2n) = 2n-2.
a(A001248(n)) = A000040(n). [I.e., a(p^2) = p for primes p.]

A286475 Compound filter (for counting primes of form 6k+1, 6k+2, 6k+3 and 6k+5): a(n) = 6*A032742(n) + (A020639(n) mod 6), a(1) = 1.

Original entry on oeis.org

1, 8, 9, 14, 11, 20, 7, 26, 21, 32, 11, 38, 7, 44, 33, 50, 11, 56, 7, 62, 45, 68, 11, 74, 35, 80, 57, 86, 11, 92, 7, 98, 69, 104, 47, 110, 7, 116, 81, 122, 11, 128, 7, 134, 93, 140, 11, 146, 43, 152, 105, 158, 11, 164, 71, 170, 117, 176, 11, 182, 7, 188, 129, 194, 83, 200, 7, 206, 141, 212, 11, 218, 7, 224, 153, 230, 67, 236, 7, 242, 165, 248, 11, 254, 107
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Examples

			For n = 55 = 5*11, a(n) = 6*A032742(55) + (5 modulo 6) = 6*11 + 5 = 71.
For n = 121 = 11*11, a(n) = 6*A032742(121) + (11 modulo 6) = 6*11 + 1 = 71.
For n = 91 = 7*13, a(n) = 6*A032742(91) + (7 modulo 6) = 6*13 + 1 = 79.
For n = 169 = 13*13, a(n) = 6*A032742(169) + (13 modulo 6) = 6*13 + 1 = 79.
		

Crossrefs

Programs

  • Mathematica
    With[{k = 6}, Table[Function[{p, d}, k d + Mod[p, k] - k Boole[n == 1]] @@ {#, n/#} &@ FactorInteger[n][[1, 1]], {n, 85}]] (* Michael De Vlieger, May 12 2017 *)
  • Python
    from sympy import divisors, primefactors
    def a(n): return 1 if n==1 else 6*divisors(n)[-2] +(min(primefactors(n))%6) # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286475 n) (if (= 1 n) n (+ (* 6 (A032742 n)) (modulo (A020639 n) 6))))
    

Formula

a(1) = 1, for n > 1, a(n) = 6*A032742(n) + (A020639(n) mod 6).

A318506 a(n) = A032742(n) OR A001065(n)-A032742(n), where OR is bitwise-or (A003986) and A001065 = sum of proper divisors and A032742 = the largest proper divisor of n.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 7, 3, 7, 1, 14, 1, 7, 5, 15, 1, 13, 1, 14, 7, 11, 1, 28, 5, 15, 13, 14, 1, 31, 1, 31, 15, 19, 7, 55, 1, 19, 13, 30, 1, 53, 1, 22, 31, 23, 1, 60, 7, 27, 21, 30, 1, 63, 15, 60, 23, 31, 1, 94, 1, 31, 21, 63, 15, 45, 1, 58, 23, 39, 1, 119, 1, 39, 25, 62, 11, 55, 1, 106, 31, 43, 1, 106, 23, 43, 29, 60, 1, 111, 13, 62, 31
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A003986(A032742(n), A318505(n)).
For n > 1, a(n) = A001065(n) - A318508(n).

A318507 a(n) = A032742(n) XOR A001065(n)-A032742(n), where XOR is bitwise-or (A003987) and A001065 = sum of proper divisors and A032742 = the largest proper divisor of n.

Original entry on oeis.org

1, 1, 1, 3, 1, 0, 1, 7, 2, 6, 1, 12, 1, 4, 1, 15, 1, 5, 1, 6, 3, 8, 1, 20, 4, 14, 13, 0, 1, 20, 1, 31, 15, 18, 1, 55, 1, 16, 9, 10, 1, 52, 1, 4, 29, 20, 1, 44, 6, 11, 21, 14, 1, 60, 13, 56, 23, 30, 1, 80, 1, 28, 1, 63, 11, 12, 1, 58, 19, 4, 1, 115, 1, 38, 1, 60, 3, 20, 1, 106, 22, 42, 1, 72, 23, 40, 25, 28, 1, 78, 5, 48, 27, 44, 21, 92, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2018

Keywords

Comments

Note that here zeros occur only on even perfect numbers (even terms of A000396), in contrast to A318457, which would be zero also for any hypothetical odd perfect number. - Antti Karttunen, Aug 29 2018

Crossrefs

Programs

Formula

a(n) = A003987(A032742(n), A318505(n)).
For n > 1, a(n) = A001065(n) - 2*A318508(n).
Previous Showing 11-20 of 252 results. Next