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.

A280867 Least k such that k is the sum of two totient numbers (A002202) in exactly n ways, or 0 if no such k exists.

Original entry on oeis.org

2, 8, 12, 20, 24, 32, 40, 50, 48, 62, 60, 64, 76, 102, 88, 108, 120, 128, 112, 136, 152, 148, 186, 168, 180, 192, 184, 216, 252, 236, 208, 220, 244, 232, 308, 268, 280, 292, 336, 304, 368, 328, 384, 364, 352, 408, 440, 376, 432, 400, 436, 388, 448, 492, 460, 484, 472, 548
Offset: 1

Views

Author

Altug Alkan, Jan 28 2017

Keywords

Comments

Least k such that A281687(k/2) = n, or 0 if no such k exists.
See also graph of A001172 for similar points.

Examples

			a(4) = 20 because 20 = 2 + 18 = 4 + 16 = 8 + 12 = 10 + 10; 2, 4, 8, 10, 12, 16, 18 are in A002202 and 20 is the least number with this property.
		

Crossrefs

Programs

  • PARI
    a281687(n) = sum(k=1, n, istotient(k) && istotient(2*n-k));
    a(n) = my(k=1); while(a281687(k) != n, k++); 2*k;
    
  • PARI
    do(n)=my(u=select(istotient, [1..n]),v=vector(n),t); for(i=1,#u, for(j=i,#u, t=u[i]+u[j]; if(t>n, break); v[t]++)); t=vector(vecmax(v)); for(i=1,#v, if(v[i] && t[v[i]]==0, t[v[i]]=i)); for(i=1,#t, if(t[i]==0, return(t[1..i-1]))); t \\ Charles R Greathouse IV, Jan 29 2017