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

A175555 Preperiodic part of the decimal expansion of 1/k as k runs through A065502.

Original entry on oeis.org

5, 25, 2, 1, 125, 1, 8, 0, 0, 625, 0, 5, 0, 41, 4, 0, 3, 0, 3125, 0, 0, 2, 0, 25, 0, 2, 0, 0, 208, 2, 1, 0, 0, 17, 0, 1, 0, 15625, 0, 0, 1, 0, 13, 0, 1, 1, 0, 125, 0, 1, 0, 0, 11, 0, 1, 0, 0, 1041, 0, 1
Offset: 1

Views

Author

Michel Lagneau, Jun 29 2010

Keywords

Comments

Multiples of 2 or 5 generate a quotient with a preperiodic sequence of digits, for example 1/24 = 0.041666666..., and 41 is the decimal form of the preperiodic part.
Usually a(n) = A114205(A065502(n)), but the convention in A114205 that leading zeros in the periodic part are attached to the preperiodic part seems not to be used here. - R. J. Mathar, Jul 20 2012

Examples

			a(14)=4 is in the sequence because 1/25 = 0.040000... and 4 is the prefix.
208 is in the sequence because 1/48 = 2083333.... and 208 is the prefix.
		

Crossrefs

Cf. A036275.

Programs

  • Maple
    A175555 := proc(n)
            local k,s,al ;
            k := A065502(n) ;
            for s from 1 do
                    for al from 0 to s-1 do
                            if (10^s-10^al) mod k = 0 then
                                    return floor(10^al/k) ;
                            end if;
                    end do:
            end do:
    end proc: # R. J. Mathar, Jul 22 2012

A175557 Prime preperiodic part of the decimal expansion of 1/k as k runs through A065502.

Original entry on oeis.org

5, 2, 5, 41, 3, 2, 2, 2, 17, 13, 11, 89, 7, 5, 5, 5, 41, 3, 3, 347, 3, 3, 3, 29, 2, 2, 2, 2, 26041, 2, 2, 2, 23, 2, 2, 2, 2, 2, 17, 13, 13, 1201, 11, 11, 107, 919, 89, 7, 7, 7, 7, 7, 7, 61, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 41, 4111, 3
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2010

Keywords

Comments

Primes in A175555 in the order of appearance.
Multiples of 2 or 5 generate a quotient with a preperiodic sequence of digits, for example 1/24 = 0.041666666..., and 41 is the decimal form of the preperiodic part.
The corresponding values of n are: 2, 5, 20, 24, 28, 36, 44, 50, 56, 72, 88, 112, 136, 168, 184, ...

Examples

			The prime 347 is in the sequence because 1/288 = .00347222222222222222...
The prime 1201 is in the sequence because 1/832 =.001201 923076 923076 ...
		

References

  • H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, 'Die periodischen Dezimalbrueche'.

Crossrefs

Programs

  • Maple
    for n from 1 do
        p := A175555(n) ;
        if isprime(p) then
            print(p) ;
        end if;
    end do: # R. J. Mathar, Jul 22 2012

A045572 Numbers that are odd but not divisible by 5.

Original entry on oeis.org

1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49, 51, 53, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 97, 99, 101, 103, 107, 109, 111, 113, 117, 119, 121, 123, 127, 129, 131, 133, 137, 139, 141, 143, 147, 149, 151, 153
Offset: 1

Views

Author

Jeff Burch, Dec 11 1999

Keywords

Comments

Contains the repunits R_n, (A000042 or A002275): For any m in the sequence (divisible by neither 2 nor 5), Euler's theorem (i.e., m | 10^m - 1 = 9*R_n) guarantees that R_n is always some multiple of m (see A099679) and thus forms a subsequence. - Lekraj Beedassy, Oct 26 2004
Inverse formula: n = 4*floor(a(n)/10) + floor((a(n) mod 10)/3) + 1. - Carl R. White, Feb 06 2008
Numbers ending with 1, 3, 7 or 9. - Lekraj Beedassy, Apr 04 2009
Complement of A065502. - Reinhard Zumkeller, Nov 15 2009
Union of evenish and oddish numbers, cf. A045797, A045798. - Reinhard Zumkeller, Dec 10 2011
Numbers k such that k^(4*j) mod 10 = 1, for any j. - Gary Detlefs, Jan 03 2012
Numbers coprime to 10. - Charles R Greathouse IV, Sep 05 2013
This is also the sequence of numbers such that all their divisors are the sum of the proper divisors of some number (see A001065 (sum of proper divisors) and A078923 (possible values of sigma(n)-n)). This is due to the fact that in the set of untouchable numbers (A005114) there are only 2 prime numbers (2 and 5) and all other terms are even composite. - Michel Marcus, Jun 14 2014
Numbers n for which A001589(n) is divisible by 5. - Bruno Berselli, Jun 18 2014
For a(n) > 1, positive integers x such that the decimal representation of 1/x is purely periodic after the decimal point (1/x is a repeating decimal with no non-repeating portion). - Doug Bell, Aug 05 2015
The asymptotic density of this sequence is 2/5. - Amiram Eldar, Oct 18 2020

Examples

			a(18) = 10*floor(17/4) + 2*floor( (4*(17 mod 4) + 1)/3 ) + 1
      = 10*4 + 2*floor( (4*(1)+1)/3 ) + 1
      = 40 + 2*floor(5/3) + 1
      = 40 + 2*1 + 1
      = 43.
G.f. = x + 3*x^2 + 7*x^3 + 9*x^4 + 11*x^5 + 13*x^6 + 17*x^7 + 19*x^8 + ...
		

Crossrefs

Relative complement of A017329 in A005408.
Cf. A000035, A000042, A001065, A001589, A002275, A005114, A045797, A045798, A065502, A078923, A079998, A082768 (numbers that begin with 1, 3, 7 or 9), A085820, A099679.

Programs

Formula

a(n) = 10*floor((n-1)/4) + 2*floor( (4*((n-1) mod 4) + 1)/3 ) + 1; a(n) = a(n-1) + 2 + 2*floor(((x+6) mod 10)/9). - Carl R. White, Feb 06 2008
a(n) = 2*n + 2*floor((n-3)/4) + 1. - Kenneth Hammond (weregoose(AT)gmail.com), Mar 07 2008
a(n) = -1 + 2*n + 2*floor((n+1)/4). - Kenneth Hammond (weregoose(AT)gmail.com), Mar 25 2008
From R. J. Mathar, Sep 22 2009: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5).
G.f.: x*(1 + 2*x + 4*x^2 + 2*x^3 + x^4)/((1+x) * (x^2+1) * (x-1)^2). (End)
A000035(a(n))*(1 - A079998(a(n))) = 1. - Reinhard Zumkeller, Nov 15 2009
a(n) = (10*n + 2*(-1)^(n*(n+1)/2) - (-1)^n - 5)/4. - Bruno Berselli, Nov 06 2011
G.f.: x * (1 + 2*x + 4*x^2 + 2*x^3 + x^4) / ((1 - x) * (1 - x^4)). - Michael Somos, Jun 15 2014
a(1 - n) = -a(n) for all n in Z. - Michael Somos, Jun 15 2014
0 = (a(n) - 2*a(n+1) + a(n+2)) * (a(n) - 4*a(n+2) + 3*a(n+3)) for all n in Z. - Michael Somos, Jun 15 2014
From Mikk Heidemaa, Nov 22 2017: (Start)
a(n) = (1/2)*(5*n + ((3*n + 2) mod 4) - 4);
a(n) = (1/4)*((-1)^(n + 1) + 10*n + 2*cos((n*Pi)/2) - 2*sin((n*Pi)/2) - 5);
a(n) = (1/4)*((-1)^(1 + n) + (1 - i)*exp(-(1/2)*i*n*Pi) + (1 + i)*exp(i*n*Pi/2) + 10*n - 5) (for n > 0), where i is the imaginary unit. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(10-2*sqrt(5))*Pi/10. - Amiram Eldar, Dec 12 2021
E.g.f.: (2 + cos(x) + (5*x - 3)*cosh(x) - sin(x) + (5*x - 2)*sinh(x))/2. - Stefano Spezia, Dec 07 2022

A124665 Numbers that cannot be either prefixed or followed by one digit to form a prime.

Original entry on oeis.org

20, 32, 62, 84, 114, 126, 134, 135, 146, 150, 164, 168, 176, 185, 192, 196, 204, 210, 218, 232, 236, 240, 248, 256, 258, 282, 294, 298, 305, 314, 315, 324, 326, 328, 342, 348, 350, 356, 366, 368, 374, 375, 378, 395, 406, 408, 410, 414, 416, 418
Offset: 1

Views

Author

Tanya Khovanova, Dec 23 2006

Keywords

Comments

Prefixing by 0 gives the number itself, implying that a(n) is not prime.
Disjoint union of A124666 and (intersection of A065502 and A032352). - Reinhard Zumkeller, Oct 22 2011; edited by Michel Marcus, Aug 02 2022
All integers of the form 100*(21*n)^3 belong to the sequence, so it is infinite. - Mauro Fiorentini, Jan 05 2023

Examples

			If you prefix 20 with any digit you will get an even number. Also 201, 203, 207 and 209 are all composite.
		

Crossrefs

Programs

  • Mathematica
    okQ[n_]:=If[EvenQ[n]||Divisible[n,5],Union[PrimeQ[10 n+{1,3,7,9}]] == {False},!PrimeQ[n]&&Union[PrimeQ[10 n+{1,3,7,9}]]=={False} && Union[ PrimeQ[Table[FromDigits[Join[{i},IntegerDigits[n]]],{i,9}]]] == {False}]; Select[Range[500],okQ] (* Harvey P. Dale, Jul 15 2011 *)
  • PARI
    is(n)=my(N=10*n,D=10^#Str(n)); forstep(k=n, n+9*D, D, if(isprime(k), return(0)));!(isprime(N+1)||isprime(N+3)||isprime(N+7)||isprime(N+9)) \\ Charles R Greathouse IV, Jul 15 2011
    
  • Python
    from sympy import isprime
    def ok(n):
        s = str(n)
        if any(isprime(int(s+c)) for c in "1379"): return False
        return not any(isprime(int(c+s)) for c in "0123456789")
    print([k for k in range(419) if ok(k)]) # Michael S. Branicky, Aug 01 2022

Extensions

Deleted incorrect Haskell program. - N. J. A. Sloane, Aug 02 2022

A249025 Numbers k such that 3^k - 1 is not squarefree.

Original entry on oeis.org

2, 4, 5, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 25, 26, 28, 30, 32, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 52, 54, 55, 56, 58, 60, 62, 64, 65, 66, 68, 70, 72, 74, 75, 76, 78, 80, 82, 84, 85, 86, 88, 90, 92, 94, 95, 96, 98, 100, 102, 104, 105, 106
Offset: 1

Views

Author

Felix Fröhlich, Oct 19 2014

Keywords

Comments

All even numbers are present (odd square - 1 == 0 mod 4). All multiples of 5 are present, since we can factorize 3^5k - 1 as (3^5-1)*[3^5(k-1) + ... + 1], and 3^5-1=121. Similarly all multiples of 39 are present since 3^39-1 = 405255515301=3^2*7*13^2*41^2*22643. - Jon Perry, Nov 09 2014
All multiples of positive members of A283620. - Robert Israel, Mar 16 2017

Crossrefs

Programs

  • Magma
    [n: n in [1..110]| not IsSquarefree(3^n-1)]; // Vincenzo Librandi, Oct 25 2014
  • Maple
    select(t -> igcd(t,10) > 1 or not numtheory:-issqrfree(3^t-1), [$1..150]); # Robert Israel, Mar 16 2017
  • Mathematica
    Select[Range[120], ! SquareFreeQ[3^# - 1] &] (* Vincenzo Librandi, Oct 25 2014 *)
  • PARI
    for(k=1, 1e3, if(!issquarefree(3^k-1), print1(k, ", ")))
    

Formula

A107078(A024023(n)) --> a(n) = log_3(A024023(n)).

A200065 Start with n, concatenate its trivial divisors, and repeat until a prime is reached. a(n) = 0 if no prime is ever reached.

Original entry on oeis.org

0, 0, 13, 0, 0, 0, 17, 0, 19, 0, 1111111111111111111, 0, 113, 0, 0, 0, 1117, 0, 11119, 0, 111121, 0, 1123, 0, 0, 0, 127, 0, 1129, 0, 131, 0
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 18 2012

Keywords

Comments

a(33) has 715 digits and is too large to include.
a(A065502(n)) = 0. There are other integers for which a(n) = 0 (i.e., n = 221).
The number (10^270343 - 1)/9 appears 161046 times in this sequence.
All odd primes from A096497 are in the sequence.

Examples

			17 -> {1, 17} = 117 (composite) -> {1, 117} = 1117 (prime), so a(17) = 1117.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[If[DivisorSigma[0, n] == 1 || Divisible[n, 5] || EvenQ[n], AppendTo[lst, 0], If[PrimeQ[n], n = 10^Length[IntegerDigits[n]] + n]; While[True, If[PrimeQ[n], Break[]]; n = FromDigits[Flatten[IntegerDigits[{1, n}]]]]; AppendTo[lst, n]], {n, 32}]; lst

A255577 Numbers n not coprime to 10 such that there exists an integer k > 1 where n^k contains n as its last digits in base 10.

Original entry on oeis.org

2, 4, 5, 6, 8, 12, 16, 24, 25, 28, 32, 36, 44, 48, 52, 56, 64, 68, 72, 75, 76, 84, 88, 92, 96, 104, 112, 125, 128, 136, 144, 152, 168, 176, 184, 192, 208, 216, 224, 232, 248, 256, 264, 272, 288, 296, 304, 312, 328
Offset: 1

Views

Author

Keywords

Comments

Intersection of A065502 (numbers not coprime with 10) and A072495 (k-morphic numbers).
Also defined as all n not coprime with 10 where there exists k > 1 such that n^k mod 10^floor(log_10(n)) = n.
For n > 1, a(n) <= a(n-1) + 2^(ceiling(log_10(a(n))) + 1) (conjectured).
For a(n) >= 10^k where k >= 1, there exists a(m) = a(n) mod 10^j where m < n and j < k.
From Robert Israel, May 14 2015: (Start)
n with d digits is in the sequence if and only if n is either divisible by 2^d but not by 5, or divisible by 5^d but not by 2.
For d >= 2 the number of terms with d digits is 4*5^(d-1) + 2^(d-1) - 4*floor(5^d/50) - floor(2^d/20) - x(d) where x(d) = 3 if d == 2 or 3 mod 4, 2 otherwise.
(End)

Examples

			For n = 2, we have n^5 = 2^5 = 32, whose last digit is 2 = n, so 2 is in the sequence.
For n = 3, we have n^5 = 3^5 = 243, so 3 is in the sequence.
For n = 4, we have n^3 = 4^3 = 64, so 4 is in the sequence.
...
As a counterexample, n = 41 is not in the sequence because it is coprime with 10, even though we have 41^6 = 4750104241, whose last 2 digits are 41.
		

Crossrefs

Programs

  • Maple
    F:= d -> (seq(seq(2^d*(5*j+i),i=1..4),j=0..5^(d-1)-1), seq(5^d*(2*j+1),j=0..2^(d-1)-1)):
    sort(convert({seq(F(d),d=1..4)},list)); # Robert Israel, May 14 2015
  • Tcl
    See a255577.tcl in LINKS.

Formula

For n > 6, a(n) > 2n since no term is divisible by 10 (but all are divisible by either 2 or 5). - Charles R Greathouse IV, May 13 2015

A343586 a(n) = the sum of all the multiples of 2 or 5 less than or equal to 10^n.

Original entry on oeis.org

35, 3050, 300500, 30005000, 3000050000, 300000500000, 30000005000000, 3000000050000000, 300000000500000000, 30000000005000000000, 3000000000050000000000, 300000000000500000000000, 30000000000005000000000000, 3000000000000050000000000000
Offset: 1

Views

Author

Keywords

Examples

			a(1) = 2 + 5 + 4 + 6 + 8 + 10 = 3*10^(2*1-1) + 5*10^(1-1) = 35.
		

Crossrefs

Cf. A065502 (multiples of 2 or 5).

Formula

a(n) = 3*10^(2*n-1) + 5*10^(n-1).
G.f.: 5*x*(7 - 160*x)/(1 - 110*x + 1000*x^2). - Stefano Spezia, Apr 21 2021
a(n) = 110*a(n-1)-1000*a(n-2). - Wesley Ivan Hurt, Apr 26 2021

A364834 Sum of positive integers <= n which are multiples of 2 or 5.

Original entry on oeis.org

0, 2, 2, 6, 11, 17, 17, 25, 25, 35, 35, 47, 47, 61, 76, 92, 92, 110, 110, 130, 130, 152, 152, 176, 201, 227, 227, 255, 255, 285, 285, 317, 317, 351, 386, 422, 422, 460, 460, 500, 500, 542, 542, 586, 631, 677, 677, 725, 725, 775, 775, 827, 827, 881, 936
Offset: 1

Views

Author

Darío Clavijo, Aug 09 2023

Keywords

Comments

a(n) is odd iff 5 <= n mod 20 <= 14. - Saish S. Kambali, Aug 14 2023

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[n * Boole[MemberQ[Mod[n, {2, 5}], 0]], {n, 0, 55}]] (* Amiram Eldar, Aug 09 2023 *)
  • PARI
    a(n) = vecsum(select(x->(!(x%2) || !(x%5)), [1..n])); \\ Michel Marcus, Aug 09 2023
  • Python
    sn = lambda k, n: ((n // k)*((n // k) + 1) * k) // 2
    a = lambda n: sn(2, n) + sn(5, n) - sn(10, n)
    print([a(n) for n in range(1, 56)])
    

Formula

a(n) = sn(n,2) + sn(n,5) - sn(n,10) where sn(n,d) = (an(n,d) * (an(n,d) + d))/(2*d) and an(n,d) = d * floor(n/d).
a(n) = Sum_{k=2..n} {k if gcd(k,10) > 1}.
Showing 1-9 of 9 results.