login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309155 For integer n with prime factors p_i (1 <= i <= r), with repetition, (Omega(n) = r); a(n) = Sum_{i=1..r} k_i, where k_i is the least positive integer such that p_i - k_i | n - k_i. 2
0, 1, 1, 2, 1, 3, 1, 3, 2, 5, 1, 4, 1, 7, 4, 4, 1, 5, 1, 4, 6, 11, 1, 5, 2, 13, 3, 6, 1, 7, 1, 5, 10, 17, 5, 6, 1, 19, 12, 7, 1, 5, 1, 10, 3, 23, 1, 6, 2, 5, 16, 12, 1, 7, 10, 9, 18, 29, 1, 8, 1, 31, 5, 6, 10, 9, 1, 16, 22, 9, 1, 7, 1, 37, 7, 18, 7, 11, 1, 6, 4, 41, 1, 10, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

For n>1, such a k_i always exists for every p_i|n, since with k_i=p_i - 1, p-k_i =1, always divides n - p_i. omega(n)<=a(n)<=Sopf(n) - Omega(n). The left side equality applies when n is a prime or a Carmichael number. The right side equality applies to numbers n such that k_i = p_i - 1, 1 <= i <= r (it can be shown that all numbers with this property are even, see A309239). For n>2, records of a(n) occur when n is an even semiprime.

LINKS

Table of n, a(n) for n=1..85.

FORMULA

n a prime power p^k, (k>=1) -> a(n) = k; n an even semiprime, 2*p -> a(n) = p (because for n=2*p, k_1 = 1, and k_2 = p-1).

A001221(n) <= a(n) <= A001414(n) - A001222(n).

EXAMPLE

For n prime a(n) = 1; n = 4 = 2*2 —> k_1 = k_2 = 1, so a(4) = 1 + 1 = 2.

MATHEMATICA

g[n_, p_] := Module[{k=1}, While[!Divisible[n - k, p - k], k++]; k]; a[1]=0; a[n_] := Module[{f = FactorInteger[n]}, p=f[[;; , 1]]; e=f[[;; , 2]]; Sum[e[[k]] * g[n, p[[k]]], {k, 1, Length[p]}]]; Array[a, 85] (* Amiram Eldar, Jul 18 2019 *)

PROG

(PARI) getk(p, n) = {my(k=1); while ((n - k) % (p - k), k++); k; }

a(n) = {my(f=factor(n)); for (i=1, #f~, f[i, 1] = getk(f[i, 1], n); ); sum(i=1, #f~, f[i, 1]*f[i, 2]); } \\ Michel Marcus, Jul 16 2019

CROSSREFS

Cf. A000040, A001221, A001222, A001414, A002997, A309239, A059975.

Sequence in context: A014599 A274771 A075825 * A007735 A002616 A046073

Adjacent sequences:  A309152 A309153 A309154 * A309156 A309157 A309158

KEYWORD

nonn

AUTHOR

David James Sycamore, Jul 14 2019

EXTENSIONS

More terms from Michel Marcus, Jul 16 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 08:56 EDT 2021. Contains 345358 sequences. (Running on oeis4.)