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

A104772 If n<=2 then n else (if n is odd then 2*a(n+1) else p*q, where n=p+q, p<=q, primes).

Original entry on oeis.org

1, 2, 8, 4, 18, 9, 30, 15, 42, 21, 70, 35, 66, 33, 78, 39, 130, 65, 102, 51, 114, 57, 190, 95, 138, 69, 230, 115, 322, 161, 174, 87, 186, 93, 310, 155, 434, 217, 222, 111, 370, 185, 246, 123, 258, 129, 430, 215, 282, 141, 470, 235, 658, 329, 318, 159, 530, 265, 742
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 24 2005

Keywords

Comments

Encoding of positive integers based on the Goldbach conjecture, see A104774 for decoding: A104774(A104772(n))=n;
a(n - n mod 2) = (2^(1 + n mod 2)) * A020481(floor(n/2))*A020482(floor(n/2));
for numbers greater than 4: a(even) = odd and a(odd) = even;
A001222(a(n)) = A010693(n) for n>2;
a(a(n)) = A104773(n).

Crossrefs

Formula

For k>1: a(2*k)=A020481(k)*A020482(k) and a(2*k-1)=2*a(2*k).

A104774 a(1) = 1, a(2) = 2, a(3) = 0, a(4) = 4, and for n > 4, if n is an even number, a(n) = a(n/2) - (1 if a(n/2) is not zero), otherwise if n is an odd semiprime p*q (with q >= p), then a(n) = p+q, otherwise 0.

Original entry on oeis.org

1, 2, 0, 4, 0, 0, 0, 3, 6, 0, 0, 0, 0, 0, 8, 2, 0, 5, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 7, 0, 1, 14, 0, 12, 4, 0, 0, 16, 0, 0, 9, 0, 0, 0, 0, 0, 0, 14, 9, 20, 0, 0, 0, 16, 0, 22, 0, 0, 6, 0, 0, 0, 0, 18, 13, 0, 0, 26, 11, 0, 3, 0, 0, 0, 0, 18, 15, 0, 0, 0, 0, 0, 8, 22, 0, 32, 0, 0, 0, 20, 0, 34, 0, 24
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 24 2005

Keywords

Comments

The original name was: If n is even then (if n<=4 then n else a(n/2) + 0^a(n/2) - 1) else (if n=p*q is semiprime then p+q else 0^(n-1))).

Crossrefs

Programs

  • PARI
    A104774(n) = if(!(n%2),if(n<=4,n,my(u=A104774(n/2)); (u+!u-1)),if(2==bigomega(n),my(f=factor(n)[,1]); if(1==omega(n),2*f[1],f[1]+f[2]), !(n-1))); \\ Antti Karttunen, Mar 30 2021

Formula

a(A104772(n)) = n; a(A104773(n)) = A104772(n).

Extensions

Name changed by Antti Karttunen, Apr 01 2021

A364028 Odd squarefree semiprimes s = p*q such that p + q and p - q are not squarefree.

Original entry on oeis.org

65, 77, 115, 141, 159, 295, 301, 303, 319, 329, 403, 427, 473, 481, 515, 533, 581, 589, 629, 655, 671, 679, 703, 713, 717, 785, 835, 869, 871, 943, 965, 1041, 1059, 1099, 1111, 1139, 1145, 1195, 1199, 1207, 1241, 1337, 1339, 1349, 1363, 1387, 1461, 1469, 1501, 1507, 1529
Offset: 1

Views

Author

Hugo Pfoertner, Jul 01 2023

Keywords

Examples

			a(1) = 65 = 13*5; 13+5 = 2*3^2, 13-5 = 2^3;
a(2) = 77 = 11*7; 11+7 = 2*3^2, 11-7 = 2^2;
a(3) = 115 = 23*5; 23+5 = 2^2*7, 23-5 = 2*3^2.
		

Crossrefs

Programs

  • PARI
    forstep (k = 15, 1529, 2, if (omega(k)==2 && bigomega(k)==2, my (F=factorint(k)); if ( !issquarefree(F[2,1]-F[1,1]) && !issquarefree(F[2,1]+F[1,1]), print1(k,", "))))
Showing 1-3 of 3 results.