login
A212875
Primonacci numbers: composite numbers that appear in the Fibonacci-like sequence generated by their own prime factors.
3
4, 9, 12, 25, 27, 169, 1102, 7921, 22287, 54289, 103823, 777627, 876897, 2550409, 20854593, 34652571, 144237401, 144342653, 167901581, 267911895, 792504416, 821223649, 1103528482, 2040412557, 2852002829, 3493254541, 6033671841, 15658859018, 116085000401
OFFSET
1,1
COMMENTS
Given n, form a sequence that starts with the k prime factors of n in ascending order. After that, each term is the sum of the preceding k terms. If n eventually appears in the sequence, it is a primonacci number. Primes possess this property trivially and are therefore excluded.
Similar to A007629 (repfigit or Keith numbers), but base-independent. If n is in A005478 (Fibonacci primes), then n^2 is a primonacci number.
The only entries that are semiprimes (A001358) are the squares of A005478. - Robert Israel, Mar 08 2016
LINKS
EXAMPLE
Fibonacci-like sequences for selected values of n:
n=12: 2, 2, 3, 7, 12, ...
n=25: 5, 5, 10, 15, 25, ...
n=1102: 2, 19, 29, 50, 98, 177, 325, 600, 1102, ...
MAPLE
with(numtheory): P:=proc(q, h) local a, b, j, k, n, t, v; v:=array(1..h);
for n from 2 to q do if not isprime(n) then b:=ifactors(n)[2]; a:=[];
for k from 1 to nops(b) do for j from 1 to b[k][2] do a:=[op(a), b[k][1]]; od; od; a:=sort([op(a)]);
b:=nops(a); for k from 1 to b do v[k]:=a[k]; od; t:=b+1; v[t]:=add(v[k], k=1..b);
while v[t]<n do t:=t+1; v[t]:=add(v[k], k=t-b..t-1); od;
if v[t]=n then print(n); fi; fi; od; end: P(10^12, 1000); # Paolo P. Lava, Mar 08 2016
MATHEMATICA
PrimonacciQ[n_]:=Module[{k, seq},
seq=FactorInteger[n];
seq=Map[Table[#[[1]], {#[[2]]}]&, seq];
seq=Flatten[seq];
k=Length[seq];
If[k==1, Return[False]];
seq=Append[seq, Apply[Plus, seq]];
While[seq[[-1]]<n, seq=Append[seq, 2*seq[[-1]]-seq[[-k-1]]]];
Return[seq[[-1]]==n]]; Select[Range[10000], PrimonacciQ]
Select[Range[10^6], Function[n, And[MemberQ[Union@ Flatten@ NestWhileList[Take[Append[#, Total@ #], -Length@ #] &, #, Last@ # <= n &, 1, 60] &[Flatten[Table[#1, {#2}] & @@@ FactorInteger@ n]], n], CompositeQ@ n]]@ # &] (* Michael De Vlieger, Mar 08 2016 *)
PROG
(Python)
from sympy import isprime, factorint
from itertools import chain
A212875_list = []
for n in range(2, 10**6):
....if not isprime(n):
........x = sorted(chain.from_iterable([p]*e for p, e in factorint(n).items()))
........y = sum(x)
........while y < n:
............x, y = x[1:]+[y], 2*y-x[0]
........if y == n:
............A212875_list.append(n) # Chai Wah Wu, Sep 12 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Herman Beeksma, May 29 2012
STATUS
approved