OFFSET
1,2
COMMENTS
Links various subsequences of A025487 with an unusual number of important sequences, including the Fibonacci, Lucas, and other generalized Fibonacci sequences (see cross-references).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Eric Weisstein's World of Mathematics, Fibonacci n-Step Number
FORMULA
a) If n has no prime gaps in its factorization (cf. A073491), then, if the canonical factorization of n into prime powers is the product of p_i^(e_i), a(n) is the sum of all products of one or more nonadjacent exponents, plus 1. For example, if A001221(n) = 3, a(n) = e_1*e_3 + e_1 + e_2 + e_3 + 1. If A001221(n) = k, the total number of terms always equals A000045(k+2).
The answer can also be computed in k steps, by finding the answers for the products of the first i powers, for i = 1 to i = k. Let the result of the i-th step be called r(i). r(1) = e_1 + 1; r(2) = e_1 + e_2 +1; for i > 2, r(i) = r(i-1) + e_i * r(i-2).
b) If n has prime gaps in its factorization, express it as a product of the minimum number of A073491's members possible. Then apply either of the above methods to each of those members, and multiply the results to get a(n). a(n) = A000005(n) iff n has no pair of consecutive primes as divisors.
a(n) = Sum_{d|n} (1-A296210(d)). - Antti Karttunen, Dec 15 2017
EXAMPLE
Since 3 of 30's 8 divisors (6, 15, and 30) are multiples of 2 or more consecutive primes, a(30) = 8 - 3 = 5.
MATHEMATICA
Array[DivisorSum[#, 1 &, FreeQ[Differences@ PrimePi@ FactorInteger[#][[All, 1]], 1] &] &, 105] (* Michael De Vlieger, Dec 16 2017 *)
PROG
(PARI)
A296210(n) = { if(1==n, return(0)); my(ps=factor(n)[, 1], pis=vector(length(ps), i, primepi(ps[i])), diffsminusones = vector(length(pis)-1, i, (pis[i+1]-pis[i])-1)); !factorback(diffsminusones); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Matthew Vandermast, Nov 05 2009
EXTENSIONS
Edited by Matthew Vandermast, May 24 2012
STATUS
approved