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-2 of 2 results.

A182076 Smallest number k such that the difference between the greatest prime divisor of k and the product of the other distinct prime divisors equals n.

Original entry on oeis.org

2, 3, 10, 5, 14, 7, 78, 33, 22, 11, 26, 13, 114, 51, 34, 17, 38, 19, 290, 69, 46, 23, 174, 145, 186, 87, 58, 29, 62, 31, 222, 185, 430, 111, 74, 37, 258, 123, 82, 41, 86, 43, 530, 141, 94, 47, 318, 265, 590, 159, 106, 53, 354, 295, 366, 177, 118, 59, 122, 61
Offset: 1

Views

Author

Michel Lagneau, Apr 10 2012

Keywords

Comments

a(n) = n+1 if n+1 is prime.

Examples

			a(7) = 78 because the distinct prime divisors of 78 are {2, 3, 13} and 13 - 2*3 = 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 60 do:ii:=0:for k from 2 to 200000 while(ii=0) do:x:=factorset(k):m:=nops(x): s:=product ('x[i] ', 'i'=1..m-1):if s+n = x[m]  then printf(`%d, `,k):ii:=1:else fi:od: od:
  • PARI
    a(n)=my(t);for(k=n+1,4<Charles R Greathouse IV, Apr 11 2012
    
  • PARI
    a(n)=my(p=nextprime(n+1));while(!issquarefree(p-n), p=nextprime(p+1));p*(p-n) \\ Charles R Greathouse IV, Apr 11 2012

A212710 Smallest number k such that the difference between the greatest prime divisor of k^2+1 and the sum of the other prime distinct divisors equals n.

Original entry on oeis.org

411, 1, 3, 447, 2, 57, 212, 8, 307, 13, 5, 38, 319, 99, 3310, 70, 4, 242, 132, 50, 73, 17, 192, 12, 133, 3532, 41, 22231, 999, 43, 172, 68, 83, 11878, 294, 30, 6, 111, 9, 776, 2059, 922, 818, 46, 1183, 23, 216, 182, 557, 2010, 1818, 3323, 945, 512, 568, 76
Offset: 1

Views

Author

Michel Lagneau, May 24 2012

Keywords

Examples

			a(1) = 411 because 411^2+1 = 2 * 13 * 73 * 89  and 89 - (2 + 13 + 73) = 89 - 88 = 1.
		

Crossrefs

Programs

  • Maple
    A212710 := proc(n)
        local fs,gpf,opf,k ;
        for k from 1 do
            fs := numtheory[factorset](k^2+1) ;
            gpf := max(op(fs)) ;
            opf := add( f,f=fs)-gpf ;
            if gpf-opf = n then
                return k;
            end if;
        end do:
    end proc:
    seq(A212710(n),n=1..50) ; # R. J. Mathar, Nov 14 2014
  • Mathematica
    lst={};Do[k=1;[While[!2*FactorInteger[k^2+1][[-1,1]]-Total[Transpose[FactorInteger[k^2+1]][[1]]]==n,k++]];AppendTo[lst,k],{n,0,60}];lst (* Michel Lagneau, Oct 28 2014 *)
  • PARI
    a(n) = {k = 1; ok = 0; while (!ok, f = factor(k^2+1); nbp = #f~; ok = (f[nbp, 1] - sum(i=1, nbp-1, f[i,1]) == n); if (!ok, k++);); k;} \\ Michel Marcus, Nov 09 2014
Showing 1-2 of 2 results.