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.

User: Pahikkala Jussi

Pahikkala Jussi's wiki page.

Pahikkala Jussi has authored 11 sequences. Here are the ten most recent ones:

A174965 Length of the n-th run of consecutive terms in A000961.

Original entry on oeis.org

5, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Author

Pahikkala Jussi, Apr 02 2010

Keywords

Comments

Let b(n) be partial sums of this sequence, as b(0) = 0, b(n) = b(n-1) + a(n). Then 2's in this sequence occur at certain positions k so that A000961(b(k))-1 = one of the terms of A006549. E.g., a(6625) = 2, and b(6625) = 6637, with A000961(6637) = 65537, the end of 2-run (65536,65537) in A000961. (The start of that 2-run, 65536, is listed as A006549(12), and 12 = 6637-6625.) - Antti Karttunen, Jul 24 2017
Position of 2s: {5, 11, 36, 62, 1068, 6625, 12358, 43566, ...},
position of 3: {2}, position of 5: {1}. All other positions pertain to 1 for A000961(n) <= 10^8. - Michael De Vlieger, Jul 25 2017

Examples

			n a(n) run in A000961
1:  5 (1 2 3 4 5)
2:  3 (7 8 9)
3:  1 (11)
4:  1 (13)
5:  2 (16 17)
6:  1 (19)
7:  1 (23)
8:  1 (25)
9:  1 (27)
10: 1 (29)
11: 2 (31 32)
12: 1 (37)
13: 1 (41)
14: 1 (43)
15: 1 (47)
16: 1 (49)
17: 1 (53)
18: 1 (59)
19: 1 (61)
20: 1 (64)
21: 1 (67)
22: 1 (71)
23: 1 (73)
24: 1 (79)
25: 1 (81)
26: 1 (83)
27: 1 (89)
28: 1 (97)
29: 1 (101)
30: 1 (103)
31: 1 (107)
32: 1 (109)
33: 1 (113)
34: 1 (121)
35: 1 (125)
36: 2 (127 128)
37: 1 (131)
38: 1 (137)
etc.
		

Crossrefs

Programs

  • Mathematica
    With[{n = 500}, Function[s, Function[t, Length /@ DeleteCases[Split@ ReplacePart[t, Map[# -> 1 &, s]], k_ /; First@ k == 0]]@ ConstantArray[0, Max@ s]]@ Sort@ Flatten[{{1}}~Join~Array[Function[p, Map[p^# &, Range@ Floor@ Log[p, n]] ][Prime@ #] &, PrimePi@ n]]] (* Michael De Vlieger, Jul 25 2017 *)

Extensions

Terms a(33) & a(36) corrected, more terms added by Antti Karttunen, Jul 24 2017

A146984 List of integer-valued contraharmonic means (u^2+v^2)/(u+v) of two positive integers u and v (with u < v) ordered by increasing u and increasing v (u = 2, 3, 4, ...; v = u+1, u+2, ...).

Original entry on oeis.org

5, 5, 13, 10, 25, 17, 41, 10, 15, 26, 61, 37, 85, 20, 50, 113, 15, 39, 65, 145, 13, 25, 34, 82, 181, 101, 221, 17, 20, 30, 52, 75, 122, 265, 145, 313, 29, 35, 74, 170, 365, 25, 29, 51, 65, 123, 197, 421, 40, 100, 226, 481, 257, 545, 30, 45, 53, 78, 130, 183
Offset: 1

Author

Pahikkala Jussi, Nov 04 2008

Keywords

Comments

Any number a(n) is also a hypotenuse number A009003 (and conversely) - see Pahikkala 2010, Theorem 5.

Examples

			a(1) = (2^2+6^2)/(2+6) = 5, a(2) = (3^2+6^2)/(3+6) = 5, a(3) = (3^2+15^2)/(3+15) = 13.
		

Crossrefs

After sorting and removing duplicates we get A009003. - N. J. A. Sloane, Mar 20 2011

Programs

  • Maple
    K:=100; t1:=[];
    for u from 1 to K-1 do for v from u+1 to 2*u^2-u do
    if (u^2+v^2) mod (u+v) = 0 then t1:=[op(t1),(u^2+v^2)/(u+v)]; fi;
    od: od: t1; # N. J. A. Sloane, Mar 20 2011

Formula

The contraharmonic mean of u and v is (u^2+v^2)/(u+v).

Extensions

Minor edits by N. J. A. Sloane, Mar 20 2011

A146209 Integers a(n) for which the factorization in the real quadratic field Q(sqrt(a(n))) is not unique.

Original entry on oeis.org

10, 15, 26, 30, 34, 35, 39, 42, 51, 55, 58, 65, 66, 70, 74, 78, 79, 82, 85, 87, 91, 95, 102, 105, 106, 110, 111, 114, 115, 119, 122, 123, 130, 138, 142, 143, 145, 146, 154, 155, 159, 165, 170, 174, 178, 182, 183, 185, 186, 187, 190, 194, 195
Offset: 1

Author

Pahikkala Jussi, Oct 28 2008

Keywords

Comments

The class number of Q(sqrt(a(n))) is greater than 1.
Contains A029702, A053330 and A051990 as subsequences. See A219361 for positive integers D for which Q(sqrt D) is a UFD. - M. F. Hasler, Oct 30 2014

Examples

			For n = 6, a(6) = 35 since 35 is the sixth positive squarefree integer u for which the factorization in Q(sqrt(u)) is not unique.
		

References

  • Z. I. Borevich and I. R. Shafarevich, Zahlentheorie. Birkhäuser Verlag, Basel und Stuttgart (1966).

Crossrefs

Cf. A003172.

Programs

  • Mathematica
    Select[Range[200], SquareFreeQ[#] && NumberFieldClassNumber[Sqrt[#]] > 1 &] (* Alonso del Arte, Sep 05 2012 *)

A135412 Integers that equal three times the Heronian mean of two positive integers.

Original entry on oeis.org

3, 6, 7, 9, 12, 13, 14, 15, 18, 19, 21, 24, 26, 27, 28, 30, 31, 33, 35, 36, 37, 38, 39, 42, 43, 45, 48, 49, 51, 52, 54, 56, 57, 60, 61, 62, 63, 65, 66, 67, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 81, 84, 86, 87, 90, 91, 93, 95, 96, 97, 98, 99, 102, 103, 104, 105, 108, 109, 111
Offset: 1

Author

Pahikkala Jussi, Feb 17 2008

Keywords

Comments

The Heronian mean of two nonnegative real numbers x and y is (x + y + sqrt(xy))/3. Therefore any number n is the Heronian mean of x = 3n and y = 0 (and also of x = n and y = n).
In particular, the sequence contains all numbers n = 3k which equal three times the Heronian mean of k and itself. If the two integers are required to be distinct then most multiples of 3 are no longer in the sequence: see A050931 for the sequence of integers that equal the Heronian mean of two distinct positive integers. Writing x = r^2*s where s is squarefree, the square root is an integer iff y = k^2*s for some integer k, and thus n = s*(r^2 + k^2 + rk). Therefore this sequence consists of the numbers listed in A024614 and their multiples by squarefree s. - M. F. Hasler, Aug 17 2016

Examples

			35 is in the sequence since 5 + 20 + sqrt(5*20) = 35.
		

Crossrefs

Extensions

Edited and definition corrected, following a remark by Robert Israel, by M. F. Hasler, Aug 17 2016

A135319 a(n) is the first digit after the decimal point in the decimal expansion of log_10(n), i.e., of the Briggsian logarithm of n.

Original entry on oeis.org

0, 3, 4, 6, 6, 7, 8, 9, 9, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 1

Author

Pahikkala Jussi, Dec 06 2007, Jan 13 2008

Keywords

Examples

			a(6) = 7, because log_10(6) = 0.77815...
		

References

  • Erwin Voellmy, Fünfstellige Logarithmen und Zahlentafeln, 15th edition, Orell Foessli Verlag, Zurich (1962).

Programs

Formula

a(n) = floor(10*(log_10(n) - floor(log_10(n)))).

Extensions

More terms from R. J. Mathar and N. J. A. Sloane, Jan 11 2008

A111002 a(n) = gcd(f(n), f(n+1)) where f(n) = n^4 + n^2 + 1.

Original entry on oeis.org

1, 3, 7, 91, 21, 31, 43, 57, 73, 91, 777, 133, 157, 183, 211, 241, 273, 2149, 343, 381, 421, 463, 507, 553, 4207, 651, 703, 757, 813, 871, 931, 6951, 1057, 1123, 1191, 1261, 1333, 1407, 10381, 1561, 1641, 1723, 1807, 1893, 1981, 14497, 2163, 2257, 2353
Offset: 0

Author

Pahikkala Jussi, Sep 30 2005

Keywords

Examples

			a(10) = 7(10^2 + 10 + 1) = 777 because 10 is congruent to 3 modulo 7.
		

Programs

  • Magma
    [Gcd(n^4+n^2+1, n^4+4*n^3+7*n^2+6*n+3): n in [0..50]]; // Vincenzo Librandi, Oct 07 2015
  • Mathematica
    f[n_] := n^4 + n^2 + 1; Table[ GCD[f[n], f[n + 1]], {n, 0, 49}] (* Robert G. Wilson v, Oct 02 2005 *)
    GCD[#[[1]],#[[2]]]&/@Partition[Table[n^4+n^2+1,{n,0,50}],2,1] (* Harvey P. Dale, Mar 07 2015 *)
  • PARI
    m=50;a=3;for(k=2,m,b=k^4+k^2+1;print1(gcd(a,b),",");a=b) \\ Klaus Brockhaus, Oct 02 2005
    

Formula

a(n) = gcd(f(n), f(n+1)) for all n. a(n) = n^2 + n + 1, except when n congruent to 3 modulo 7 when a(n) = 7(n^2 + n + 1).
Conjectures from Colin Barker, Oct 06 2015: (Start)
a(n) = 3*a(n-7) - 3*a(n-14) + a(n-21) for n>20.
G.f.: -(x^20 +3*x^19 +7*x^18 +91*x^17 +21*x^16 +31*x^15 +43*x^14 +54*x^13 +64*x^12 +70*x^11 +504*x^10 +70*x^9 +64*x^8 +54*x^7 +43*x^6 +31*x^5 +21*x^4 +91*x^3 +7*x^2 +3*x +1) / ((x -1)^3*(x^6 +x^5 +x^4 +x^3 +x^2 +x +1)^3).
(End)

Extensions

More terms from Robert G. Wilson v and Klaus Brockhaus, Oct 02 2005

A105209 Nearest integer to the cube root of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Author

Pahikkala Jussi, Apr 13 2005

Keywords

Examples

			a(16) = 3 because 16^(1/3) = 2.519842...
		

References

  • Erwin Voellmy, Fünfstellige Logarithmen und Zahlentafeln, Orell Füssli Verlag, Zürich (1962).

Crossrefs

Programs

  • Maple
    for n from 1 to 200 do printf(`%d,`,round(n^(1/3))) od: # James Sellers, Apr 21 2005
  • Mathematica
    Round[Surd[Range[110],3]] (* Harvey P. Dale, Feb 28 2015 *)
  • PARI
    a(n) = round(n^(1/3)); \\ Michel Marcus, Aug 19 2016
    
  • Python
    from sympy import integer_nthroot
    def A105209(n): return (m:=integer_nthroot(n,3)[0])+((n<<3)>=((m<<1)+1)**3) # Chai Wah Wu, Jun 06 2025

Formula

Sum_{n>=1} 1/a(n)^s = 3*zeta(s-2) + zeta(s)/4^s, for s > 3 (Seung-Jin Bang, 1992). - Amiram Eldar, Oct 31 2020

Extensions

More terms from James Sellers, Apr 21 2005

A106628 Anomalous prime numbers.

Original entry on oeis.org

199, 211, 283, 317, 337, 389, 491, 509, 547, 577, 619, 683, 701, 773, 787, 797, 863, 887, 1069, 1109, 1129, 1153, 1163, 1373, 1381, 1409, 1459, 1523, 1531, 1571, 1627, 1637, 1669, 1709, 1723, 1733, 1759, 1831, 1889, 1913, 1933, 1951, 1979, 2003, 2017
Offset: 1

Author

Pahikkala Jussi, May 11 2005

Keywords

Comments

If x and y are two consecutive prime numbers (x < y), Euclid's algorithm gives integers t and d such that tx+dy = 1 = gcd(x, y). The algorithm "Anomalia" gives t and d such that |t+d| is as small as possible (it is often = 1). The prime number x is 'anomalous' iff |t+d| > 1 for x and y.
That is, primes p such that neither q-1 nor q+1 is divisible by q-p, where q is the next prime larger than p. - Charles R Greathouse IV, Aug 20 2017

Examples

			a(1) = 199 because -88*199+83*211 = 1, |-88+83| = 5 > 1;
|tx+dy| = 1 for all primes x < 199 (when t and d are determined by the algorithm "Anomalia")
		

Crossrefs

Subsequence of A083371.

Programs

  • Mathematica
    q[x_]:=Module[{y,d},If[!PrimeQ[x],Return[0]];y=NextPrime[x + 1];d=y-x;Mod[y-1, d]!=0 && Mod[y+1, d] != 0];Select[Range[2017],q] (* James C. McMahon, Aug 23 2025 *)
  • PARI
    is(x)=if(!isprime(x), return(0)); my(y=nextprime(x+1),d=y-x); (y-1)%d && (y+1)%d \\ Charles R Greathouse IV, Aug 20 2017

Formula

Conjecture: a(n) ~ n log n. - Charles R Greathouse IV, Aug 20 2017

A100686 a(1) = 1, a(2) = 2; thereafter a(2n+1) = |a(2n)^2-a(2n-1)^2|, a(2n+2) = 2*a(2n-1)*a(2n).

Original entry on oeis.org

1, 2, 3, 4, 7, 24, 527, 336, 164833, 354144, 98248054847, 116749235904, 3977703802948722503807, 22940770664883067253376, 510456831154766758152181998159655209453904127, 182503181432559739767250904458105698387204864
Offset: 1

Author

Pahikkala Jussi, Dec 08 2004

Keywords

Comments

s = 1 and t = 2 are the initial seed numbers; they give the first Pythagorean pair x = 3, y = 4. Then take s = x, t = y for next seed numbers; these give the next Pythagorean pair x = |s^2-t^2|, y = 2st. Then take s = x, t = y and so on.

Examples

			a(9) = 527^2-336^2 = 164833 because a(7) = 527 and a(8) = 336.
		

Extensions

Edited by N. J. A. Sloane, Sep 06 2008
Defined a(2n+1) by absolute values, added 4 values - R. J. Mathar, Oct 14 2010

A100678 Number of Egyptian fractions in the representation of n/(n+1) via the greedy algorithm.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 3, 3, 3, 4, 3, 4, 4, 3, 4, 5, 3, 4, 4, 4, 4, 5, 3, 4, 4, 4, 4, 5, 4, 6, 4, 4, 5, 5, 4, 5, 5, 5, 4, 5, 3, 4, 4, 4, 4, 5, 4, 4, 5, 4, 5, 5, 4, 5, 4, 5, 5, 5, 4, 5, 6, 4, 5, 5, 5, 6, 5, 5, 4, 6, 5, 5, 5, 5, 5, 5, 4, 5, 6, 6, 5, 6, 4, 5, 6, 5, 6, 6, 5, 4, 5, 5, 5, 5, 5
Offset: 1

Author

Pahikkala Jussi, Dec 06 2004

Keywords

Comments

a(n) = length of n-th row in table A247765. - Reinhard Zumkeller, Sep 25 2014

Examples

			a(16) = 5 because 16/17 = 1/2 + 1/3 + 1/10 + 1/128 + 1/32640.
		

Crossrefs

Cf. A100695.
Cf. A247765.

Programs

Extensions

More terms from M. F. Hasler, Sep 25 2014