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.

A275719 a(n) = A275718(n) - A275717(n).

Original entry on oeis.org

3, 4, 5, 4, 3, 1, 3, 4, 5, 4, 3, 1, 2, 2, 1, 1, -1, 1, 3, 4, 6, 5, 5, 6, 5, 5, 5, 4, 3, 1, 3, 4, 5, 5, 5, 6, 5, 5, 7, 5, 5, 8, 7, 7, 7, 9, 9, 9, 8, 9, 8, 7, 7, 7, 5, 5, 6, 7, 11, 12, 12, 13, 12, 13, 13, 14, 15, 14, 15, 16, 14, 13, 13, 11, 11, 11, 14, 13, 14, 11, 11, 13, 13, 15, 14, 14, 13, 13, 14, 13, 15, 15, 13, 15
Offset: 1

Views

Author

Antti Karttunen, Aug 07 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A275718(n) - A275717(n).
a(n) = A275722(n) - A275721(n).

A003961 Completely multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 3, 5, 9, 7, 15, 11, 27, 25, 21, 13, 45, 17, 33, 35, 81, 19, 75, 23, 63, 55, 39, 29, 135, 49, 51, 125, 99, 31, 105, 37, 243, 65, 57, 77, 225, 41, 69, 85, 189, 43, 165, 47, 117, 175, 87, 53, 405, 121, 147, 95, 153, 59, 375, 91, 297, 115, 93, 61, 315, 67, 111, 275, 729, 119
Offset: 1

Views

Author

Keywords

Comments

Meyers (see Guy reference) conjectures that for all r >= 1, the least odd number not in the set {a(i): i < prime(r)} is prime(r+1). - N. J. A. Sloane, Jan 08 2021
Meyers' conjecture would be refuted if and only if for some r there were such a large gap between prime(r) and prime(r+1) that there existed a composite c for which prime(r) < c < a(c) < prime(r+1), in which case (by Bertrand's postulate) c would necessarily be a term of A246281. - Antti Karttunen, Mar 29 2021
a(n) is odd for all n and for each odd m there exists a k with a(k) = m (see A064216). a(n) > n for n > 1: bijection between the odd and all numbers. - Reinhard Zumkeller, Sep 26 2001
a(n) and n have the same number of distinct primes with (A001222) and without multiplicity (A001221). - Michel Marcus, Jun 13 2014
From Antti Karttunen, Nov 01 2019: (Start)
More generally, a(n) has the same prime signature as n, A046523(a(n)) = A046523(n). Also A246277(a(n)) = A246277(n) and A287170(a(n)) = A287170(n).
Many permutations and other sequences that employ prime factorization of n to encode either polynomials, partitions (via Heinz numbers) or multisets in general can be easily defined by using this sequence as one of their constituent functions. See the last line in the Crossrefs section for examples.
(End)

Examples

			a(12) = a(2^2 * 3) = a(prime(1)^2 * prime(2)) = prime(2)^2 * prime(3) = 3^2 * 5 = 45.
a(A002110(n)) = A002110(n + 1) / 2.
		

References

  • Richard K. Guy, editor, Problems From Western Number Theory Conferences, Labor Day, 1983, Problem 367 (Proposed by Leroy F. Meyers, The Ohio State U.).

Crossrefs

See A045965 for another version.
Row 1 of table A242378 (which gives the "k-th powers" of this sequence), row 3 of A297845 and of A306697. See also arrays A066117, A246278, A255483, A308503, A329050.
Cf. A064989 (a left inverse), A064216, A000040, A002110, A000265, A027746, A046523, A048673 (= (a(n)+1)/2), A108228 (= (a(n)-1)/2), A191002 (= a(n)*n), A252748 (= a(n)-2n), A286385 (= a(n)-sigma(n)), A283980 (= a(n)*A006519(n)), A341529 (= a(n)*sigma(n)), A326042, A049084, A001221, A001222, A122111, A225546, A260443, A245606, A244319, A246269 (= A065338(a(n))), A322361 (= gcd(n, a(n))), A305293.
Cf. A249734, A249735 (bisections).
Cf. A246261 (a(n) is of the form 4k+1), A246263 (of the form 4k+3), A246271, A246272, A246259, A246281 (n such that a(n) < 2n), A246282 (n such that a(n) > 2n), A252742.
Cf. A275717 (a(n) > a(n-1)), A275718 (a(n) < a(n-1)).
Cf. A003972 (Möbius transform), A003973 (Inverse Möbius transform), A318321.
Cf. A300841, A305421, A322991, A250469, A269379 for analogous shift-operators in other factorization and quasi-factorization systems.
Cf. also following permutations and other sequences that can be defined with the help of this sequence: A005940, A163511, A122111, A260443, A206296, A265408, A265750, A275733, A275735, A297845, A091202 & A091203, A250245 & A250246, A302023 & A302024, A302025 & A302026.
A version for partition numbers is A003964, strict A357853.
A permutation of A005408.
Applying the same transformation again gives A357852.
Other multiplicative sequences: A064988, A357977, A357978, A357980, A357983.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Haskell
    a003961 1 = 1
    a003961 n = product $ map (a000040 . (+ 1) . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012, Oct 09 2011
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A003961 n) (apply * (map A000040 (map 1+ (map A049084 (factor n))))))
    ;; Antti Karttunen, May 20 2014
    
  • Maple
    a:= n-> mul(nextprime(i[1])^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 13 2017
  • Mathematica
    a[p_?PrimeQ] := a[p] = Prime[ PrimePi[p] + 1]; a[1] = 1; a[n_] := a[n] = Times @@ (a[#1]^#2& @@@ FactorInteger[n]); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Dec 01 2011, updated Sep 20 2019 *)
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[n == 1], {n, 65}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); prod(k=1,matsize(f)[1],nextprime(1+f[k,1])^f[k,2]))
    
  • PARI
    a(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Michel Marcus, May 17 2014
    
  • Perl
    use ntheory ":all";  sub a003961 { vecprod(map { next_prime($) } factor(shift)); }  # _Dana Jacobsen, Mar 06 2016
    
  • Python
    from sympy import factorint, prime, primepi, prod
    def a(n):
        f=factorint(n)
        return 1 if n==1 else prod(prime(primepi(i) + 1)**f[i] for i in f)
    [a(n) for n in range(1, 11)] # Indranil Ghosh, May 13 2017

Formula

If n = Product p(k)^e(k) then a(n) = Product p(k+1)^e(k).
Multiplicative with a(p^e) = A000040(A000720(p)+1)^e. - David W. Wilson, Aug 01 2001
a(n) = Product_{k=1..A001221(n)} A000040(A049084(A027748(n,k))+1)^A124010(n,k). - Reinhard Zumkeller, Oct 09 2011 [Corrected by Peter Munn, Nov 11 2019]
A064989(a(n)) = n and a(A064989(n)) = A000265(n). - Antti Karttunen, May 20 2014 & Nov 01 2019
A001221(a(n)) = A001221(n) and A001222(a(n)) = A001222(n). - Michel Marcus, Jun 13 2014
From Peter Munn, Oct 31 2019: (Start)
a(n) = A225546((A225546(n))^2).
a(A225546(n)) = A225546(n^2).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 2.06399637... . - Amiram Eldar, Nov 18 2022

A246282 Numbers k for which A003961(k) > 2*k; numbers n such that if n = Product_{k >= 1} (p_k)^(c_k), then Product_{k >= 1} (p_{k+1})^(c_k) > 2*n, where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 27, 28, 30, 32, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 52, 54, 56, 57, 60, 63, 64, 66, 68, 69, 70, 72, 75, 76, 78, 80, 81, 84, 88, 90, 91, 92, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 116, 117, 120, 124, 125, 126, 128, 130, 132, 135, 136, 138, 140, 144
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Numbers n such that A003961(n) > 2*n.
Numbers n such that A048673(n) > n.
The sequence grows as:
a(10) = 18
a(100) = 192
a(1000) = 1830
a(10000) = 18636
a(100000) = 187350
a(1000000) = 1865226
a(10000000) = 18654333
and the powers of 10 occur at:
a(5) = 10
a(53) = 100
a(536) = 1000
a(5423) = 10000
a(53290) = 100000
a(535797) = 1000000
a(5361886) = 10000000
suggesting that the ratio a(n)/n is converging to an constant and an arbitrary natural number is slightly more likely to be in this sequence than in the complement A246281. See also comments at A246351 and compare to quite a different ratio present in the "inverse" case A246362.
From Antti Karttunen, Aug 27 2020: (Start)
Any perfect number, including all odd perfect numbers (if such numbers exist), must occur in this sequence. See A286385 and A326042 for the reason why.
Like abundancy index (ratio A000203(n)/n), also ratio A003961(n)/n is multiplicative and always > 1 for all n > 1. Thus if the number has a proper divisor that is in this sequence, then the number itself also is. See A337372 for terms included here, but with no proper divisor in this sequence. (End)
For k >= 2, if m * A130789(k) is a term then m * A130789(k-1) is a term. - Peter Munn, Sep 01 2025
Could be called "primeshift-abundant numbers", in analogy with A005101. - Antti Karttunen, Sep 01 2025

Examples

			3 = p_2 (3 is the second prime, A000040(2)) is not a member, because p_3 = 5 (5 is the next prime after 3, A000040(3)) and 5/3 < 2.
4 = 2*2 = p_1 * p_1 is a member, as p_2 * p_2 = 3*3 = 9, and 9/4 > 2.
33 = 3*11 = p_2 * p_5 is not a member, as p_3 * p_6 = 5*13 = 65, and 65/33 < 2.
35 = 5*7 = p_3 * p_4 is a member, as p_4 * p_5 = 7*11 = 77, and 77/35 > 2.
		

Crossrefs

Complement: A246281.
Setwise difference of A246352 and A048674.
Cf. A000040, A003961, A048673, A130789, A246362, A252742 (characteristic function), A286385, A326042, A337345.
Positions of positive terms in A252748 and in A337345.
Union of A337372 (primitive terms), A341610 (non-primitive terms).
Cf. also A275717, A275718.

Programs

  • Mathematica
    Select[Range[144], 2 # < Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[# == 1] &] (* Michael De Vlieger, Feb 22 2021 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); }; \\ From A003961
    isA246282(n) = (A003961(n) > (n+n));
    n = 0; i = 0; while(i < 10000, n++; if(isA246282(n), i++; write("b246282.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A246282 (MATCHING-POS 1 1 (lambda (n) (> (A003961 n) (* 2 n)))))
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A246282 (MATCHING-POS 1 1 (lambda (n) (> (A048673 n) n))))

Extensions

A new shorter version of name prepended by Antti Karttunen, Aug 27 2020

A275718 Numbers n for which A003961(n) < A003961(n-1).

Original entry on oeis.org

5, 7, 9, 10, 11, 13, 17, 19, 21, 22, 23, 25, 28, 29, 31, 33, 34, 37, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 65, 67, 69, 71, 73, 76, 77, 79, 82, 83, 85, 89, 91, 93, 94, 97, 99, 101, 103, 105, 106, 107, 109, 111, 113, 115, 118, 121, 127, 129, 131, 133, 134, 136, 137, 139, 141, 142, 145, 148, 149, 151, 153, 154, 155
Offset: 1

Views

Author

Antti Karttunen, Aug 07 2016

Keywords

Comments

One more than the positions of descents in permutation A048673.

Crossrefs

One more than A275722.
Complement: A275717 (apart from 1 which is in neither sequence).

Programs

  • Mathematica
    f[n_] := Times @@ Map[Prime[PrimePi@ First[#] + 1]^Last[#] &, FactorInteger@ n]; Select[Range@ 155, f[# - 1] > f@ # &] (* Michael De Vlieger, Aug 07 2016 *)

A275721 Numbers n for which A003961(n+1) > A003961(n).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 14, 15, 17, 19, 23, 25, 26, 29, 31, 34, 35, 37, 38, 39, 41, 43, 44, 47, 49, 51, 53, 55, 59, 61, 62, 63, 65, 67, 69, 71, 73, 74, 77, 79, 80, 83, 85, 86, 87, 89, 91, 94, 95, 97, 99, 101, 103, 107, 109, 111, 113, 115, 116, 118, 119, 121, 122, 123, 124, 125, 127, 129, 131, 134, 137, 139, 142, 143, 145
Offset: 1

Views

Author

Antti Karttunen, Aug 07 2016

Keywords

Comments

Positions of the ascents in permutation A048673.

Crossrefs

One less than A275717.
Complement: A275722.

Programs

  • Mathematica
    f[n_] := Times @@ Map[Prime[PrimePi@ First[#] + 1]^Last[#] &, FactorInteger@ n]; Select[Range@ 145, f@ # < f[# + 1] &] (* Michael De Vlieger, Aug 07 2016 *)

A275720 a(1) = 0; for n > 1, if A003961(n) > A003961(n-1) then a(n) = a(n-1) + 1, otherwise if A003961(n) < A003961(n-1), then a(n) = a(n-1) - 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 07 2016

Keywords

Crossrefs

Formula

a(1) = 0; for n > 1, if A003961(n) > A003961(n-1) then a(n) = a(n-1) + 1, otherwise if A003961(n) < A003961(n-1), then a(n) = a(n-1) - 1.
Showing 1-6 of 6 results.