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.

A298156 Composite numbers n of which the sum of prime divisors of n (with repetition) equals the concatenation of two integers k and k + 1.

Original entry on oeis.org

35, 42, 50, 60, 64, 72, 76, 81, 86, 93, 136, 145, 153, 159, 164, 174, 253, 273, 289, 325, 365, 385, 390, 416, 438, 462, 468, 488, 494, 497, 549, 550, 555, 559, 592, 644, 658, 660, 664, 666, 686, 703, 704, 710, 737, 747, 792, 836, 852, 884, 885, 891, 920, 940, 944, 946, 980
Offset: 1

Views

Author

Daniel Blaine McBride, Jan 13 2018

Keywords

Comments

Composite numbers n, of which A001414(n) (sum of prime divisors of n with repetition, sopfr(n)) is in sequence A001704 (numbers m which are the concatenation of k and k+1).

Examples

			35 = 5*7, sopfr(35) = 5+7 = 12, 12 =k||k+1 when k = 1.
		

Crossrefs

Cf. A001414 (sum of prime divisors of n with repetition, sopfr(n)).
Cf. A001704 (numbers which are the concatenation of k and k+1).

Programs

  • Mathematica
    Select[Range[10^3], And[CompositeQ@ #, Subtract @@ Map[FromDigits, TakeDrop[#, Floor[Length[#]/2]]] == -1 &@ IntegerDigits@ Total[Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[#]]]] &] (* Michael De Vlieger, Jan 14 2018 *)
  • PARI
    is(n)=my(f = factor(n), sopfr = sum(i = 1, #f~, f[i, 1] * f[i, 2]); d = digits(sopfr), v); if((#d) % 2 == 0, v = vector(#d / 2); v[#v] = -1; return(vector(#d / 2, j, d[j]) - vector(#d / 2, #d / 2 + j, d[j]) == v), return(d == concat(digits(10^(#d \ 2) - 1), digits(10^(#d \ 2))))) \\ David A. Corneth, Jan 13 2018
    
  • PARI
    sopfr(n,f=factor(n))=sum(i=1,#f~, f[i,1]*f[i,2])
    has(n)=my(d=digits(n),k=#d); digits(fromdigits(d[1..k\2])+1) == d[k\2+1..k]
    list(lim)=my(v=List()); forfactored(n=35,lim\1, if(n[2][,2]!=[1]~ && has(sopfr(0,n[2])), listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Jan 15 2018

Formula

sopfr(n) = k||k+1 when n is not prime and k is a positive integer.