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: Martin Raab

Martin Raab's wiki page.

Martin Raab has authored 25 sequences. Here are the ten most recent ones:

A371349 Odd addends k > 0 such that x^2 + x + k produces a new minimum of its Hardy-Littlewood Constant.

Original entry on oeis.org

1, 3, 9, 15, 33, 63, 75, 225, 243, 273, 453, 813, 1275, 1443, 2763, 3003, 6693, 9933, 10515
Offset: 1

Author

Hugo Pfoertner, Apr 11 2024, suggested by Martin Raab

Keywords

Crossrefs

Cf. A331940 for more information.

Programs

  • PARI
    \\ Uses function HardyLittlewood2 from a221712.gp; see link in A331940
    a371349(upto) = {my (Hmin=oo); forstep (k=1, upto, 2, my (H=HardyLittlewood2(x^2+x+k)); if (H
    				

A358982 In base 10, for all numbers with n digits, a(n) is the number where the sum of digits of a(n) minus the sum of the last n digits of a(n)^3 reaches a record maximum.

Original entry on oeis.org

8, 87, 887, 8887, 99868, 978887, 7978887, 96699868, 987978887, 9896699868, 89987978887, 969896699868, 7969896699868, 97969896699868, 897969896699868, 9988999939998887, 99988999939998887, 999988999939998887, 8999988999939998887, 78999988999939998887
Offset: 1

Author

Martin Raab, Dec 08 2022

Keywords

Comments

The corresponding last n digits of a(n)^3 are 2, 03, 103, 0103, 00032, 110103, 1110103, 00100032, 011110103, 0300100032, ...
The corresponding differences between the digit sums are 6, 12, 19, 27, 35, 41, 47, 55, 63, 69, 77, 84, 91, 99, 107, 115, 124, 132, ...
Question: what constant does the ratio between the maximum differences and n converge to?
In case of a tie, only the smallest example is given. For example, n=7, a(n)=9899868 would also meet the criterion. Other cases of a tie happen at n=10, 12, 13, 14, 28, 29, 31, ...

Examples

			The digit sum of 7978887 is 54, the digit sum of 7978887^3 mod 10^7 = 1110103 is 7. 54-7=47, which means that randomly finding numbers for which the sum of digits of x^3 is smaller than the sum of digits of x is easiest when choosing x with the given seven ending digits (that is, of course, depending on the preferred size of x).
Heuristically it can be conjectured that there are infinitely many numbers x for which the digit sum of x^3 is smaller than the digit sum of x.
		

Crossrefs

Programs

  • PARI
    a(n)={r=0; i=10^n; for(x=1, i-1, s1=sumdigits(x); s2=sumdigits(x^3%i); d=s2-s1; if(d
    				
  • PARI
    /* The following program finds the first 69 terms, and also many of the larger terms, correctly. The 70th term will be incorrect because of the truncation to 10^4*(9/10)=9000 record numbers for each number of digits; if the truncation is increased to 10^5*(9/10) records (n=5 at the beginning), the first 237 terms give a(n) with corresponding maxima. (Further restrictions on ending digits find optimal solutions for a higher number of digits.) */
    {n=4; d=10^n; v=vector(d*9/10); print("keeping "#v" record numbers"); w=vector(d*9); for(x=1, d-1, if(x%10, y=sumdigits((x^3)%d); z=sumdigits(x); v[9*(x\10)+(x%10)]=x+d*(y-z))); v=vecsort(v); while(d<10^250, for(i=1, #v, for(j=0, 9, x=d*j+v[i]%d; y=sumdigits((x^3)%(d*10)); z=sumdigits(x); w[10*(i-1)+j+1]=x+d*10*(y-z))); d*=10; n++; w=vecsort(w); v=vecextract(w,Str("1.."#v)); print(n" digits - record differences: "vecextract(v,"1..5")\d" / record mod "10"^"n": "v[1]%d))}

A334287 Smallest full reptend prime p such that there is a gap of exactly 2n between p and the next full reptend prime, or 0 if no such prime exists.

Original entry on oeis.org

17, 19, 23, 491, 7, 47, 419, 577, 29, 0, 1789, 233, 461, 433, 193, 509, 823, 61, 1979, 1327, 659, 269, 11503, 1381, 887, 14251, 3167, 8297, 3469, 0, 7247, 15073, 2473, 743, 19309, 4349, 21503, 12823, 14939, 3863, 5419, 6389, 24137, 27211, 10343, 13577, 18979
Offset: 1

Author

Martin Raab, Apr 21 2020

Keywords

Comments

Gaps of length congruent to 20 mod 40 do not exist. All full reptend primes are either 7, 11, 17, 19, 21, 23, 29, or 33 mod 40, and no difference of 20 exists between any of these numbers.

Examples

			a(9) = 29 because there is a gap of 2*9 = 18 between 29 and the next full reptend prime 47.
a(10) = 0 because no gap of 2*10 = 20 exists between full reptend primes.
		

Crossrefs

Cf. A001913.

Programs

  • PARI
    is(p) = Mod(10, p)^(p\2)==-1 && znorder(Mod(10, p))+1==p;
    isok(p, n) = {if (! is(p), return (0)); if (isprime(p+n) && is(p+n), forprime(q=p+1, p+n-1, if (is(q), return (0));); return (1););}
    a(n) = {n *= 2; if ((n % 40) == 20, return (0)); my (p = 2); while (! isok(p, n), p = nextprime(p+1)); p;} \\ Michel Marcus, Apr 22 2020

A157082 Primes in a millennium reach a record minimum: numbers n such that A038823(n) is lower than all A038823(k) with k

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 10, 11, 14, 16, 18, 29, 38, 40, 43, 64, 88, 168, 180, 212, 293, 356, 452, 555, 638, 871, 913, 1637, 2346, 3279, 7176, 14420, 15369, 36912, 51459, 96733, 113376, 141219, 200315, 233047, 729345, 951847, 1704275, 1917281, 2326985
Offset: 1

Author

Martin Raab, Feb 22 2009

Keywords

Comments

88 is in the sequence because there are 76 primes between 88000 and 88999 and every millennium < 88000 contains more than 76 primes.
The last term of this sequence is 13893290219204, because there are no primes between 13893290219204000 and 13893290219204999.

Crossrefs

Cf. A038823.

A135047 Initial members of an octuplet of generalized Fermat primes: numbers n such that (n+m)^4+1 is prime for m=0,2,4,6,8,10,12 and 14.

Original entry on oeis.org

10332305196, 15731023654, 202193785336, 417860702688, 427241399860, 648488931216
Offset: 1

Author

Martin Raab, Feb 11 2008

Keywords

Comments

n^4+1 can be prime for at most eight consecutive even numbers n, otherwise at least one member would be divisible by 17.

Examples

			a(1)=10332305196 because 103323051964^4+1 is prime and (10332305196+m)^4+1 is prime for all even m up to 14.
		

Crossrefs

Cf. A000068.

A133658 Decimal expansion of Sum_{x=integer, -inf < x < inf} (1/sqrt(2*Pi))*exp(-x^2/2).

Original entry on oeis.org

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

Author

Martin Raab, Dec 28 2007

Keywords

Comments

Standard normal distribution taken at all integers x from -infinity to +infinity.
Not only is this constant quite close to 1/tanh(pi^2) (difference is about 1.43*10^-17), but it is even closer if the second term of its continued fraction, 186895766.612113..., is reduced by 1/2 (the difference then decreases to about 10^-34).
The continued fraction begins: 1, 186895766, 1, 1, 1, 1, 2, 1, 2, 2, 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, 1, 5, 4, 1, 6, 1, 5, 8, 1, 1, 3, 1, 44, 3, 7, 31, 2, 5, 1, 1, 5, 1, 5, 5334, 1, ... - Robert G. Wilson v, Dec 30 2007
See A084304 for cont.frac.(1/tanh(pi^2)) = [1, 186895766, 8, 1, 11, 2, 3, ...] - M. F. Hasler, Oct 24 2009

Examples

			1.000000005350575982148479362482248...
		

Programs

  • Mathematica
    RealDigits[(1 + 2*Sum[ Exp[ -x^2/2], {x, 1, 24, 1}])/Sqrt[2 Pi], 10, 2^7][[1]] (* Robert G. Wilson v, Dec 30 2007 *)
  • PARI
    default(realprecision,100); sqrt(2/Pi)*(suminf(k=1,exp(-k^2/2))+.5)
    vecextract(eval(Vec(Str( % ))),"^2") \\ M. F. Hasler, Oct 24 2009

Extensions

More terms from Robert G. Wilson v, Dec 30 2007

A138597 Odd numbers k such that Hamming weight of k equals Hamming weight of k^3.

Original entry on oeis.org

1, 56953, 1830651, 5502457, 130002327, 2941876987, 3479043677, 3674103727, 10601496029, 12739098539, 29928193915, 93415397243, 111392161401, 532403822507, 893286088059, 1039374483323
Offset: 1

Author

Martin Raab, May 13 2008

Keywords

Comments

This sequence is A118655 without the trivial examples k*2^n.
a(17) > 2^40. - Donovan Johnson, May 05 2012

Crossrefs

Cf. A363799 (Hamming weight(k) > Hamming weight(k^3)).

Programs

  • PARI
    isok(k) = (k%2) && (hammingweight(k) == hammingweight(k^3)); \\ Michel Marcus, Jul 31 2023

Formula

A000120(a(n)) = A000120(a(n)^3) with a(n) odd

Extensions

a(14)-a(16) from Donovan Johnson, May 05 2012

A132826 Decimal expansion of the integer Googol!.

Original entry on oeis.org

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

Author

Martin Raab, Nov 18 2007, Dec 11 2007

Keywords

Comments

The number in question has 9956570551809674817234887108108339491770560299419 \ 63334338855462168341353507911292252707750506615682568 digits and ends in exactly 10^101/8 - 18 zeros. - Robert G. Wilson v, Jan 09 2013
The last nonzero term of this sequence is 6. - Washington Bomfim, Dec 24 2010

References

  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Math.; section 4, exercises 40, and 54.

Crossrefs

Programs

  • Mathematica
    f[n_] := 10^FractionalPart[N[(n*Log[n] - n + (1/2)*Log[(2*n + 1/3)*Pi])/Log[10], 203]]; RealDigits[ f[10^100], 10, 101][[1]] (* Robert G. Wilson v, Jan 09 2013 *)

Formula

10^100! = 1*2*3*4*...*(10^100-1)*10^100.

A131599 Square roots of the numbers in A130448.

Original entry on oeis.org

1, 2, 3, 5, 6, 24, 26, 84, 284, 816, 1424, 1674, 149274, 278874, 280726, 2808716, 2963576, 8533626, 23558584, 27969274, 28769826, 29804174, 47778874, 88769826, 282980174, 297956374, 884776174, 934198626, 1645509274, 2660505174, 2794331374, 2829841374
Offset: 1

Author

Martin Raab, Aug 31 2007

Keywords

Examples

			24^2=576 and none of the substrings 5, 7, 6, 57, 76 or 56 is a square number.
		

Crossrefs

Cf. A130448.

Extensions

a(31)-a(32) from Giovanni Resta, Jan 08 2018

A130448 Squares whose decimal representation contains no proper subsequence which is a positive square.

Original entry on oeis.org

1, 4, 9, 25, 36, 576, 676, 7056, 80656, 665856, 2027776, 2802276, 22282727076, 77770707876, 78807087076, 7888885568656, 8782782707776, 72822772707876, 555006880085056, 782280288087076, 827702888070276, 888288787822276, 2282820800707876, 7880082008070276, 80077778877070276, 88778000807227876, 782828878078078276, 872727072820287876
Offset: 1

Author

Martin Raab, Aug 07 2007

Keywords

Comments

Is this sequence finite and if so what is the last term?
Yes, the sequence must be finite. This follows from a well-known result: there are no infinite antichains for the subsequence ordering. - Jeffrey Shallit, Mar 05 2014
If it exists, a(29) is greater than 10^18. - Mauro Fiorentini, Jan 24 2017
If it exists, a(51) is greater than 2*10^30. - Giovanni Resta, Jan 08 2018

Examples

			576 is in the list because none of its proper subsequences 5, 7, 6, 57, 76 or 56 are squares.
		

Crossrefs

Cf. A131599, A238334 (substrings).

Programs

  • Mathematica
    fQ[n_] := Module[{d = IntegerDigits[n], ds, sq}, ds = FromDigits /@ Union[Most[Rest[Subsets[d]]]]; sq = Select[ds, # > 0 && IntegerQ[Sqrt[#]] &, 1]; sq == {}]; Select[Range[0, 100000]^2, fQ] (* T. D. Noe, Mar 05 2014 *)
  • PARI
    isok(n) = {my(d = digits(n)); for (k = 1, #d, for (j= 1, #d - k + 1, if (j != #d, sd = vector(j, i, d[k+i-1]); nsd = fromdigits(sd); if (nsd && issquare(nsd), return(0));););); return (1);} \\ Michel Marcus, Apr 21 2018
    
  • Python
    # see linked program for faster version
    from math import isqrt
    from itertools import chain, combinations as C, count, islice
    def issquare(n): return isqrt(n)**2 == n
    def psets(s): # nonempty proper subsets of s
        return chain.from_iterable(C(s, r) for r in range(1, len(s)))
    def cond(s):
        ss = ("".join(t) for t in psets(s) if t[0] != "0")
        return not any(issquare(int(u)) for u in ss)
    def agen(): yield from (k**2 for k in count(1) if cond(str(k**2)))
    print(list(islice(agen(), 15))) # Michael S. Branicky, Feb 23 2023

Extensions

Edited by N. J. A. Sloane, Sep 14 2007
a(23)-a(28) from Mauro Fiorentini, Jan 24 2017