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.

A064159 Numbers n such that g(n) + sopfr(n) = n, where g(n)= number of nonprimes <=n (A062298) and sopfr(n) = sum of primes dividing n with repetition (A001414).

This page as a plain text file.
%I A064159 #32 Dec 15 2017 17:35:37
%S A064159 1,24,27,30,55,65,95,145,155,185,205,822,894,2779,2863,8104,64270,
%T A064159 174691,174779,1301989,1302457,3523478,9554955,9555045,9556455,
%U A064159 70111213,70111247,514269523,514269599,10246934786,10246934962,204475046525,554805817358,4086199294828
%N A064159 Numbers n such that g(n) + sopfr(n) = n, where g(n)= number of nonprimes <=n (A062298) and sopfr(n) = sum of primes dividing n with repetition (A001414).
%C A064159 That is, numbers n such that primepi(n) = sopfr(n). - _Michel Marcus_, Mar 25 2017
%p A064159 with(numtheory):
%p A064159 a:= proc(n) option remember; local k;
%p A064159        for k from 1+ `if`(n=1, 0, a(n-1))
%p A064159        while add(i[1]*i[2], i=ifactors(k)[2])<>pi(k) do od; k
%p A064159     end:
%p A064159 seq(a(n), n=1..17);  # _Alois P. Heinz_, Dec 18 2011
%t A064159 a[n_] := a[n] = Module[{k}, For[k = 1 + If[n==1, 0, a[n-1]], Sum[i[[1]] * i[[2]], {i, FactorInteger[k]}] != PrimePi[k], k++]; k]; a[1] = 1;
%t A064159 Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 25}] (* _Jean-François Alcover_, Mar 25 2017, after _Alois P. Heinz_ *)
%o A064159 (PARI) sopfr(n) = my(fac=factor(n)); sum(i=1, #fac~, fac[i,1]*fac[i,2]);
%o A064159 for (n=1,10^6, if (sopfr(n)==primepi(n), print1(n, ", "))) \\ edited by _Michel Marcus_, Mar 25 2017
%K A064159 nonn
%O A064159 1,2
%A A064159 _Jason Earls_, Sep 15 2001
%E A064159 a(17)-a(21) from _Alois P. Heinz_, Dec 18 2011
%E A064159 a(22)-a(31) from _Donovan Johnson_, Jun 29 2012
%E A064159 a(32)-a(34) from _Giovanni Resta_, Mar 28 2017