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.

Previous Showing 11-14 of 14 results.

A057333 Numbers of n-digit primes that undulate.

Original entry on oeis.org

4, 20, 74, 347, 1743, 8385, 44355, 229952, 1235489, 6629026, 37152645, 202017712, 1142393492, 6333190658
Offset: 1

Views

Author

Patrick De Geest, Sep 15 2000

Keywords

Comments

'Undulate' means that the alternate digits are consistently greater than or less than the digits adjacent to them (e.g., 70769). Smoothly undulating palindromic primes (e.g., 95959) are a subset and included in the count.

References

  • C. A. Pickover, "Wonders of Numbers", Oxford New York 2001, Chapter 52, pp. 123-124, 316-317.

Crossrefs

Programs

  • Python
    from sympy import isprime
    def f(w,dir):
        if dir == 1:
            for s in w:
                for t in range(int(s[-1])+1,10):
                    yield s+str(t)
        else:
            for s in w:
                for t in range(0,int(s[-1])):
                    yield s+str(t)
    def A057333(n):
        c = 0
        for d in '123456789':
            x = d
            for i in range(1,n):
                x = f(x,(-1)**i)
            c += sum(1 for p in x if isprime(int(p)))
            if n > 1:
                y = d
                for i in range(1,n):
                    y = f(y,(-1)**(i+1))
                c += sum(1 for p in y if isprime(int(p)))
        return c # Chai Wah Wu, Apr 25 2021

Extensions

Offset corrected and a(10)-a(11) from Donovan Johnson, Aug 08 2010
a(12) from Giovanni Resta, Feb 24 2013
a(2) corrected by Chai Wah Wu, Apr 25 2021
a(13)-a(14) from Chai Wah Wu, May 02 2021

A129120 Undulating Harshad numbers: numbers divisible by the sum of their own digits with decimal expansions in an abab...ab pattern.

Original entry on oeis.org

10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42, 45, 48, 50, 54, 60, 63, 70, 72, 80, 81, 84, 90, 171, 252, 414, 828, 1010, 1212, 1818, 2020, 2424, 3030, 3636, 4040, 4848, 5050, 5454, 6060, 7070, 7272, 8080, 9090, 10101, 13131, 20202, 23232, 26262, 30303, 39393
Offset: 1

Views

Author

Jason Earls, May 25 2007

Keywords

Comments

This definition of "undulating" is more restrictive than the one used in A033619 and excludes single-digit numbers and numbers of the pattern aaaaaa. - R. J. Mathar, Jun 15 2007

References

  • Jason Earls, Red Zen, Lulu Press, NY, 2006, pp. 56-57. ISBN: 978-1-4303-2017-3.

Crossrefs

Programs

  • Mathematica
    undHarsQ[n_] := Module[{d = IntegerDigits[n]}, Divisible[n, Plus @@ d] &&  Length @ Union[d] > 1 && Length @ Union[d[[1 ;; -1 ;; 2]]] == 1 && Length @ Union[d[[2 ;; -1 ;; 2]]] == 1 ]; Select[Range[40000], undHarsQ] (* Amiram Eldar, Jan 27 2021 *)

Extensions

More terms from R. J. Mathar, Jun 15 2007

A343763 Common prime factors of A007663(183)/1093 and A007663(490)/3511.

Original entry on oeis.org

3, 7, 79, 2731, 8191, 121369, 22366891
Offset: 1

Views

Author

Felix Fröhlich, Apr 28 2021

Keywords

Comments

The sequence is complete (cf. Michon).
Are these primes necessarily prime factors of A007663(i)/p when p = prime(i) is a Wieferich prime (A001220)?
Note the following curious observation: 3 * 7 * 79 * 2731 * 8191 * 121369 * 22366891 = 100743818301219097892181. That number is a repdigit in bases 4 and 64 and undulating in bases 2, 8, 128, 2048 and 8192. Compare that to observations from John Blythe Dobson (cf. Dobson).

Crossrefs

Programs

  • PARI
    fq(n) = (2^(n-1)-1)/n
    my(x=fq(1093)/1093, y=fq(3511)/3511); forprime(p=1, , if(Mod(x, p)==0 && Mod(y, p)==0, print1(p, ", ")))

A344888 a(n) is the least base k >= 2 where n is an undulating number (i.e., with digits of the form abababab...).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jun 01 2021

Keywords

Examples

			For n = 49:
- we have:
     b  49 in base b  Undulating?
     -  ------------  -----------
     2        110001  No
     3          1211  No
     4           301  No
     5           144  No
     6           121  Yes
- so a(49) = 6.
		

Crossrefs

Programs

  • PARI
    is(n, base=10) = my (d=digits(n, base)); #d<=2 || d[1..#d-2]==d[3..#d]
    a(n) = for (b=2, oo, if (is(n, b), return (b)))
    
  • Python
    def A344888(n):
        b, m = 2, n
        while True:
            m, x = divmod(m, b)
            m, y = divmod(m, b)
            while m > 0:
                m, z = divmod(m,b)
                if z != x:
                    break
                if m > 0:
                    m, z = divmod(m,b)
                    if z != y:
                        break
                else:
                    return b
            else:
                return b
            b += 1
            m = n # Chai Wah Wu, Jun 02 2021

Formula

a(n) <= A000196(n) + 1 for any n > 0.
a(n) <= 10 for any n in A033619.
a(n) = 2 iff n belongs to A000225 or to A000975.
Previous Showing 11-14 of 14 results.